Warning: JavaScript is not enabled or not loaded. Please enable JavaScript for the best experience.
CloudAPI/docs
Overview

Cloud API Platform

A unified RESTful interface for provisioning, managing, and monitoring cloud resources programmatically. Build integrations with confidence.

What is the Cloud API?

The Cloud API provides a single entry point for interacting with compute, storage, networking, and identity services across your infrastructure. Every action available in the console can be performed through the API, enabling automation, CI/CD pipelines, and custom tooling.

Core Capabilities

Resource Management

Create, update, and delete compute instances, volumes, and networks via simple REST calls.

Identity & Access

Manage API keys, service accounts, and role-based access control for teams.

Monitoring & Logs

Query metrics, retrieve audit logs, and configure alerting thresholds programmatically.

Event Webhooks

Subscribe to real-time events and trigger workflows on resource state changes.

Base URL

All API requests are made to the following base URL over HTTPS:

GET https://api.cloudplatform.io/v2

Common Use Cases

  • Infrastructure as Code — Provision and tear down environments from CI/CD pipelines using API calls.
  • Custom Dashboards — Pull real-time metrics to build internal monitoring interfaces.
  • Multi-tenant Platforms — Automate resource isolation and access control for SaaS products.
  • Cost Optimization — Schedule auto-scaling and deprovisioning to control cloud spend.

Quick Start

Make your first request in under a minute. Grab an API key from the Authentication section, then run:

$ curl request

curl -X GET https://api.cloudplatform.io/v2/instances \

-H "Authorization: Bearer YOUR_API_KEY" \

-H "Content-Type: application/json"

Explore the full endpoint reference in the Endpoints section.

Section 02

Authentication

All API requests require authentication. The platform uses API key–based auth transmitted as a Bearer token in the Authorization header.

API Key Authentication

Each project is issued a unique API key from the Dashboard → API Keys panel. Keys are scoped to your workspace and carry the permissions you assign. Treat your API key as a secret — do not expose it in client-side code or public repositories.

Bearer Token Header

Include your key in the Authorization header using the Bearer scheme:

Header
Authorization: Bearer YOUR_API_KEY

Security Best Practices

  • Store API keys in environment variables — never hardcode them in source files.
  • Rotate keys periodically and revoke unused keys from the Dashboard.
  • Use HTTPS exclusively — plain HTTP requests are rejected by the gateway.
  • Scope keys to specific services when possible to limit blast radius.

Environment Variable Usage

Set your API key as an environment variable so it stays out of version control:

.env
CLOUD_API_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxxxx

Sample Authenticated Request

A complete cURL example hitting the /v1/status endpoint:

cURL
curl -X GET https://api.cloudplatform.io/v1/status \
  -H "Authorization: Bearer $CLOUD_API_KEY" \
  -H "Content-Type: application/json"

A successful response returns 200 OK with your workspace details. A 401 Unauthorized response indicates a missing or invalid key.

Endpoints

Core REST endpoints for managing resources. All requests require an Authorization header with your API key.

GET /v1/resources

List Resources

Returns a paginated list of all resources associated with your account. Supports filtering and sorting via query parameters.

Query Parameters

Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Items per page, max 100 (default: 25)
sort string No Sort field: created_at, name

Response 200

{
  "data": [
    {
      "id": "res_8xKp2mNq",
      "name": "My Resource",
      "status": "active",
      "created_at": "2026-04-20T14:30:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 25,
    "total": 142
  }
}
GET /v1/resources/{id}

Retrieve a Resource

Fetch a single resource by its unique identifier. Returns the full resource object including metadata.

Path Parameters

Parameter Type Required Description
id string Yes Unique resource ID (e.g. res_8xKp2mNq)

Response 200

{
  "id": "res_8xKp2mNq",
  "name": "My Resource",
  "status": "active",
  "config": {
    "region": "us-east-1",
    "tier": "standard"
  },
  "created_at": "2026-04-20T14:30:00Z",
  "updated_at": "2026-04-22T09:15:00Z"
}
POST /v1/resources

Create a Resource

Create a new resource under your account. Send a JSON body with the required fields. Returns the newly created resource object.

Request Body

Field Type Required Description
name string Yes Human-readable name (max 128 chars)
region string Yes Deployment region (e.g. us-east-1)
tier string No Plan tier: standard or premium (default: standard)

Example Request

curl -X POST https://api.example.com/v1/resources \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production DB",
    "region": "us-east-1",
    "tier": "premium"
  }'

Response 201

{
  "id": "res_Tn4vQwLx",
  "name": "Production DB",
  "status": "provisioning",
  "config": {
    "region": "us-east-1",
    "tier": "premium"
  },
  "created_at": "2026-04-24T10:00:00Z",
  "updated_at": "2026-04-24T10:00:00Z"
}

Support

Frequently Asked Questions

Common questions about authentication, limits, versioning, and testing.

What are the API rate limits?

Free-tier keys are limited to 60 requests/min. Production keys support up to 1,000 requests/min. Rate-limit headers (X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response. If you exceed the limit you'll receive a 429 Too Many Requests status.

How does API versioning work?

Versions are passed via the URL path: /v2/resource. When a new major version ships, the previous version is supported for at least 12 months. Deprecation timelines are published in the changelog and communicated via the Sunset response header.

Is there a sandbox or testing environment?

Yes. Every account includes a sandbox project accessible at https://sandbox.api.example.com. Sandbox keys use the prefix sk_test_ and do not incur billing. Data in the sandbox resets every 24 hours.

What format do error responses follow?

All errors return a JSON body with status, code, and message fields. Validation errors include an additional errors[] array with per-field details. HTTP status codes follow RFC 7231 conventions.

How do I authenticate requests?

Pass your API key in the Authorization header as a Bearer token: Authorization: Bearer <your_key>. See the Authentication section for full details.

Where can I get help or report issues?

Open a ticket at [email protected] or use the #api-help channel in our developer Discord. Bug reports can be filed on the public GitHub issue tracker. Response time for production-tier accounts is under 4 hours.