API Reference
While Kollect is running, it exposes a small REST API that the web interface (and the built-in MCP server) use. It listens on http://localhost:8080 by default and binds to loopback only — the API is unauthenticated, so it is never exposed to other hosts. Change the port with --port or KOLLECT_PORT.
Base URL
http://localhost:8080/apiCore data endpoints
GET /api/data
Return the complete collected inventory across every platform.
POST /api/import
Import a previously exported JSON inventory into the running instance.
POST /api/switch
Switch the active dataset (used by the web interface when swapping between imported datasets).
/api/data response shape
Keys are present only for platforms that were collected:
{
"aws": { "EC2Instances": [...], "S3Buckets": [...], "RDSInstances": [...], ... },
"azure": { "VirtualMachines": [...], "StorageAccounts": [...], ... },
"gcp": { "ComputeInstances": [...], "StorageBuckets": [...], ... },
"kubernetes": { "Namespaces": [...], "Pods": [...], "PersistentVolumes": [...], ... },
"openshift": { ... },
"docker": { "containers": [...], "images": [...], "volumes": [...], "networks": [...] },
"terraform": { "Resources": [...], "Outputs": [...], "Variables": [...] },
"vault": { "SecretsEngines": [...], "AuthMethods": [...], "Policies": [...] },
"vsphere": { "VirtualMachines": [...], "Hosts": [...], "Datastores": [...], "Clusters": [...] },
"proxmox": { ... },
"hyperv": { ... },
"nutanix": { ... }
}Snapshots & costs
GET /api/snapshots
Snapshot inventory across Kubernetes, AWS, Azure and GCP (Snapshot Hunter).
GET /api/snapshots/vsphere
vSphere VM snapshot inventory.
GET /api/costs
Cost analysis for cloud resources and snapshots (Cost Explorer).
Query parameters
platform—aws,azure,gcp, orall(defaultall)
Status & export
GET /api/check-credentials
Report which platforms have working credentials — used for the connection badges in the UI.
{ "aws": true, "azure": false, "gcp": true, "kubernetes": true, "docker": true, "terraform": false, "vsphere": false }POST /api/export/scenario
Generate a Veeam Scenario Builder CSV from the collected data.
Platform connection endpoints
The web interface uses these to connect to a platform and trigger collection. Most are POST; a few return supporting lists.
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/aws/connect | Connect to AWS and collect |
| GET | /api/aws/profiles | List local AWS profiles |
| POST | /api/azure/connect | Connect to Azure and collect |
| GET | /api/azure/subscriptions | List Azure subscriptions |
| POST | /api/gcp/connect | Connect to GCP and collect |
| GET | /api/gcp/projects | List GCP projects |
| POST | /api/kubernetes/connect | Connect to a Kubernetes cluster and collect |
| GET | /api/kubernetes/contexts | List kubeconfig contexts |
| POST | /api/kubernetes/upload-kubeconfig | Upload a kubeconfig file |
| POST | /api/openshift/connect | Connect to OpenShift and collect |
| POST | /api/docker/connect | Connect to the Docker daemon and collect |
| GET | /api/docker/test-connection | Test Docker connectivity |
| POST | /api/terraform/connect | Analyze Terraform state |
| POST | /api/terraform/upload-state | Upload a Terraform state file |
| POST | /api/vault/connect | Connect to Vault and collect |
| GET / POST | /api/vsphere, /api/vsphere/collect | vSphere status and collection |
| POST | /api/hyperv/connect | Connect to Hyper-V and collect |
| POST | /api/proxmox/connect | Connect to Proxmox VE and collect |
| POST | /api/nutanix/connect | Connect to Nutanix Prism and collect |
MCP server
Running ./kollect --mcp starts a Model Context Protocol server (stdio) alongside the API, exposing three tools that read from the endpoints above:
read_kollect_data— read/api/data,/api/snapshots, or/api/costsanalyze_kollect_data— read and analyze data against a questionsearch_kollect_data— search the data for a term or pattern
See mcp.md for MCP client configuration.
Usage examples
# All collected data
curl http://localhost:8080/api/data
# Which platforms are connected
curl http://localhost:8080/api/check-credentials
# Snapshots and costs
curl http://localhost:8080/api/snapshots
curl "http://localhost:8080/api/costs?platform=aws"
# Import a previously exported inventory
curl -X POST http://localhost:8080/api/import \
-H "Content-Type: application/json" \
-d @my-infrastructure-data.json- Data is held in memory while Kollect runs — use
--outputto persist it. - The server binds to
127.0.0.1only and requires no authentication. - Requests must be same-origin (a browser same-origin guard is enforced).