Warning: JavaScript is not enabled or not loaded. Please enable JavaScript for the best experience.
Cloud API Platform logo Cloud API Platform Docs
Navigation
DOCS / Getting Started

Integrate with the Cloud API

Build, authenticate, and query our RESTful API. Ship integrations faster with predictable endpoints, consistent error handling, and comprehensive documentation.

GET /v1/resources
Example
$ curl -X GET https://api.cloudplatform.io/v1/resources \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

→ Returns a paginated list of resources. See Endpoints

Documentation

Overview

The Cloud API Platform provides a unified RESTful interface for provisioning, managing, and monitoring cloud infrastructure resources programmatically. Integrate compute, storage, networking, and identity services into your applications with a single API key.

Core Capabilities

  • Provision and manage compute instances, volumes, and networking
  • Object and block storage with lifecycle policies
  • IAM — roles, tokens, and scoped permissions
  • Real-time metrics, logs, and alerting webhooks
  • Multi-region deployments with automatic failover

Quick Reference

Base URL
https://api.cloudplatform.io/v1
Response Format

All responses return JSON with a consistent envelope: { data, meta, errors }

Rate Limits

1,000 requests/min per API key. Burst up to 50 req/s. Rate-limit headers included in every response.

example_request.sh
# List all compute instances
curl -X GET https://api.cloudplatform.io/v1/instances \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
200 OK response.json
{
  "data": [
    {
      "id": "ins_8f3a2b1c",
      "type": "compute.standard",
      "region": "us-east-1",
      "status": "running",
      "created_at": "2026-04-22T10:30:00Z"
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "per_page": 25
  },
  "errors": []
}

See Authentication for token generation & scopes. Full resource reference in Endpoints.

Section 02

Authentication

All API requests require authentication via an API key. Keys are scoped per project and must be kept secret. Never expose keys in client-side code or public repositories.

How API Key Authentication Works

Include your API key in the Authorization header of every request using the Bearer scheme:

Authorization: Bearer YOUR_API_KEY

Authentication Flow

  1. 1

    Generate an API key

    Navigate to Dashboard → Settings → API Keys and create a new key scoped to your project.

  2. 2

    Store securely

    Save the key in an environment variable or secrets manager. The full key is shown only once.

  3. 3

    Attach to requests

    Add the Authorization: Bearer header to every API call.

  4. 4

    Handle responses

    On success, the API returns the requested resource. On failure, inspect the status code and error body.


Token Security Tips

  • Store keys in environment variables — never hard-code them.
  • Rotate keys periodically and revoke unused keys immediately.
  • Use separate keys for development, staging, and production.
  • Never expose keys in frontend code, logs, or version control.
  • Restrict key permissions to only the scopes your app needs.

Common Auth Error Responses

Status Code Description
401 UNAUTHORIZED Missing or invalid API key.
403 FORBIDDEN Key lacks required scope or permission.
429 RATE_LIMITED Too many requests. Retry after the Retry-After interval.

Example Request

A complete authenticated GET request using cURL:

curl -X GET https://api.cloudplatform.io/v1/projects \
  -H "Authorization: Bearer sk_live_abc123def456" \
  -H "Content-Type: application/json"

Replace sk_live_abc123def456 with your actual API key.

Reference

API Endpoints

Core REST endpoints for managing projects, deployments, and usage metrics. All requests require a valid API key passed via the Authorization header.

GET /v1/projects

Returns a paginated list of all projects associated with the authenticated account.

Query Parameters

  • page integer, optional — Page number (default 1)
  • limit integer, optional — Items per page (max 100)

Response Example

{
  "data": [
    {
      "id": "proj_8xK2m",
      "name": "My App",
      "created_at": "2026-03-10T08:00:00Z"
    }
  ],
  "meta": { "page": 1, "total": 42 }
}
GET /v1/projects/{project_id}

Retrieve a single project by its unique identifier, including configuration and status metadata.

Path Parameters

  • project_id string, required — Unique project ID

Response Example

{
  "id": "proj_8xK2m",
  "name": "My App",
  "status": "active",
  "region": "us-east-1",
  "created_at": "2026-03-10T08:00:00Z"
}
POST /v1/deployments

Create a new deployment for a specified project. The deployment will be queued and begin provisioning immediately.

Request Body

{
  "project_id": "proj_8xK2m",
  "branch": "main",
  "environment": "production"
}

Response Example

{
  "id": "dpl_Qn94z",
  "status": "queued",
  "project_id": "proj_8xK2m",
  "created_at": "2026-04-24T12:30:00Z"
}
GET /v1/usage

Fetch aggregated usage metrics for your account — API calls, bandwidth, and compute hours — over a specified date range.

Query Parameters

  • start_date string, required — ISO 8601 date
  • end_date string, required — ISO 8601 date
  • granularity string, optionaldaily | monthly

Response Example

{
  "period": "2026-04-01/2026-04-24",
  "api_calls": 184320,
  "bandwidth_gb": 42.7,
  "compute_hours": 118.5
}

FAQ

Frequently Asked Questions

Common questions about authentication, rate limits, versioning, and more.

How do I authenticate API requests?
All requests require a Bearer token passed in the Authorization header. Generate an API key from the Dashboard under Settings → API Keys. Tokens are scoped per environment (production / sandbox) and can be revoked at any time.
What are the rate limits?
The default rate limit is 1,000 requests per minute per API key. Exceeding this returns a 429 Too Many Requests response with a Retry-After header. Enterprise plans support higher thresholds — contact support for details.
How does API versioning work?
Versions are date-based (e.g. 2026-04-01). Set the version via the X-API-Version header. If omitted, the latest stable version is used. Breaking changes are always released under a new version identifier.
How should I handle error responses?
Errors follow a consistent JSON schema with code, message, and an optional details array. Use the HTTP status code for control flow and the code field for programmatic handling. 5xx errors are safe to retry with exponential back-off.
What is the webhook retry policy?
Failed webhook deliveries (non-2xx responses or timeouts) are retried up to 5 times with exponential back-off over 24 hours. Each attempt includes an X-Webhook-Attempt header. You can inspect delivery logs and manually replay events from the Dashboard.
Is there a sandbox environment?
Yes. Every account includes a free sandbox at sandbox.api.example.com. Sandbox keys are prefixed with sk_sandbox_. Data is isolated from production and resets weekly. Rate limits in sandbox match production defaults.
How do I report a bug or request a feature?
Open an issue on our GitHub repository or email [email protected]. Include your API version, request ID (from the X-Request-Id header), and a minimal reproduction.