Skip to main content

Cloud Infrastructure Endpoints (Multi-Cloud)

Manage Cloud Providers

  • GET /api/cloud/providers - List cloud providers (aws, gcp, azure). Auth required. Query: include_inactive=true to include inactive. Used by the connect UI to show Connect AWS / GCP / Azure.
  • PATCH /api/cloud/providers/:providerId/enable - Enable a cloud provider (admin)
  • PATCH /api/cloud/providers/:providerId/disable - Disable a cloud provider (admin)
Note: To connect cloud providers, use the workspace-level cloud connections API: connect-aws, connect-gcp, connect-azure (/api/cloud-connections/:workspaceSlug).

Get Regions

  • GET /api/cloud/:workspaceSlug/:projectSlug/regions?include_inactive=false - Get regions for the project’s connected cloud provider
Path Parameters:
  • workspaceSlug (required): The workspace slug identifier
  • projectSlug (required): The project slug identifier
Query Parameters:
  • include_inactive (optional): Include inactive regions (default: false)
Description: Returns regions for the cloud provider that is connected to the specified project (AWS, GCP, or Azure). The provider is automatically detected from the project’s connected cloud connection (connectedCloudId). Azure regions are stored in the same regions table; seed them with npm run seed:aws (which also seeds AWS and GCP regions). Authentication: Required (Bearer token) Example Requests:
Example Response:
Error Responses: If project has no cloud connection:
If project not found:
If workspace not found or access denied:

Get Cache Engines

  • GET /api/cloud/cache-engines - Get available cache engine types (Redis, Valkey, Memcached)
  • GET /api/cloud/cache-engines?include_inactive=true - Include inactive cache engines
Query Parameters:
  • include_inactive (optional): Include inactive cache engines (default: false)
Example Requests:
Example Response:
Note: To update the available versions, run:

Get Cache Engine Versions

  • GET /api/cloud/:projectSlug/cache-versions - Get available versions for cache engines
  • GET /api/cloud/:projectSlug/cache-versions?engine=redis - Filter by specific engine
  • GET /api/cloud/:projectSlug/cache-versions?mode=serverless - Get only serverless-compatible versions
Path Parameters:
  • projectSlug (required): Project slug. Requires authentication; user must have access to the project.
Query Parameters:
  • engine (optional): Filter by engine code (e.g., ‘redis’, ‘valkey’, ‘memcached’)
  • include_inactive (optional): Include inactive cache engines (default: false)
  • mode (optional): AWS only. 'serverless' | 'all' (default: 'all'). Ignored for GCP; GCP responses never include serverlessVersions, totalServerlessVersions, or mode.
Description: Returns available engine versions for the project’s cloud provider. AWS: ElastiCache (redis, valkey, memcached) via npm run fetch-cache-engine-versions; may include serverlessVersions when mode=all. GCP: Memorystore for Redis and Memcached via npm run fetch-gcp-cache-engine-versions; availableVersions from gcpVersions (e.g. REDIS_7_2, MEMCACHE_1_6). GCP does not support Valkey. GCP has no serverless concept: responses for GCP do not include serverlessVersions, totalServerlessVersions, or mode. Azure: Cache for Redis only; availableVersions (e.g. 6, 4), serverlessVersions: [], totalServerlessVersions: 0. For Azure and GCP, the response includes provisionedInstanceTypesAvailable: true and cacheInstanceTypesEndpoint; use that endpoint to list provisioned cache instance types (see Get Cache Instance Types below). Serverless compatibility (AWS only):
  • Redis OSS: 7.1+
  • Valkey: 7.2+
  • Memcached: 1.6.21+
When mode=serverless (AWS), only serverless-compatible versions are returned. GCP Memorystore is provisioned, not serverless. Example Requests:
Example Response (mode=all):
Pricing Information: The response always includes pricing information for each cache engine (when available), regardless of the mode parameter: Example Response (mode=serverless):
Example Response (GCP – no serverless): For projects connected to GCP, the response has provider: "gcp", mode: null, and no serverlessVersions, totalServerlessVersions, or mode in any item. GCP Memorystore is provisioned, not serverless.
Note:
  • To update the available versions, run:
    This script fetches the latest versions from AWS ElastiCache, filters serverless-compatible versions based on AWS requirements, and updates the metadata table with both all versions and serverless-compatible versions.
  • For GCP Memorystore (Redis and Memcached), run npm run fetch-gcp-cache-engine-versions. This does not write any serverless-related fields; GCP has no serverless offering.
  • To update pricing information (pricing is included in all responses when available), run:
    This script fetches ElastiCache Serverless pricing (storage and compute) from AWS Pricing API and stores it in the database.
  • For Azure and GCP (provisioned caches, no serverless), the response includes provisionedInstanceTypesAvailable: true and cacheInstanceTypesEndpoint. Use that endpoint to list provisioned cache instance types (e.g. Basic C0, Standard C1, M1). Run npm run seed:cache-instance-types to populate the cache_instance_types table.

Get Cache Instance Types

  • GET /api/cloud/:projectSlug/cache-instance-types - List provisioned cache instance types (Azure Cache for Redis, GCP Memorystore). Use when the provider has no serverless (Azure, GCP).
  • GET /api/cloud/:projectSlug/cache-instance-types?region=eastus&engine=redis - Filter by region and cache engine
Path Parameters:
  • projectSlug (required): Project slug. Requires authentication; user must have access to the project. The cloud provider is inferred from the project’s connected cloud connection.
Query Parameters:
  • region (optional): Region code (e.g., eastus, us-central1). For Azure, AWS-style codes are normalized (e.g. us-east-1eastus).
  • engine (optional): Filter by cache_engine (redis, memcached). Azure supports Redis only; GCP supports Redis (Memcached tiers may be added later).
  • family (optional): Filter by family (e.g., Basic, Standard, Premium for Azure; M1, M2, BASIC for GCP).
  • page (optional): Page number (default: 1)
  • limit (optional): Items per page (default: 50, max: 100)
Description: Returns provisioned cache tiers from the cache_instance_types table. AWS: Returns data: [] with a message that instance types are for provisioned caches; use serverless ElastiCache and cache-versions instead. Azure: Basic (C0–C6), Standard (C0–C6), Premium (P1–P5). GCP: M1–M6, BASIC, STANDARD_HA. Data is populated by npm run seed:cache-instance-types. Authentication: Required (Bearer token) Example Requests:
Example Response (Azure or GCP):
Example Response (AWS – empty):
Example Response (no cloud connection):
Notes:
  • Populate the cache_instance_types table: npm run seed:cache-instance-types
  • Fetch pricing for price_per_hour: npm run fetch-cache-instance-pricing
    • Azure: Azure Retail Prices API (serviceName Redis Cache); updates price_per_hour for Basic, Standard, Premium.
    • GCP: Reference $/GiB-hour (us-central1); price_per_hour = memory_gb × rate (M1/M2 from published docs; M3–M6 use M2 rate).

Get Instance Types

  • GET /api/cloud/:projectSlug/instance-types?region=us-east-1&page=1&limit=50 - Get instance types (EC2/machine types) with OS-specific pricing for the project’s connected cloud provider. AWS: npm run fetch-instance-types then npm run update-pricing. GCP: npm run fetch-gcp-instance-types then npm run fetch-gcp-pricing (requires GCP_PROJECT_ID, credentials, and Cloud Billing API).
Path Parameters:
  • projectSlug (required): Project slug. The cloud provider is inferred from the project’s connected cloud connection.
Query Parameters:
  • region (optional): Region code (e.g., ‘us-east-1’). If omitted, returns instance types for all regions
  • page (optional): Page number (default: 1)
  • limit (optional): Items per page (default: 50, max: 100)
Authentication: Required (Bearer token) Features:
  • Sorted by family alphabetically, then by instance code
  • Paginated results with metadata
  • Includes OS-specific pricing (Linux, Windows, RHEL, SUSE)
Example Requests:
Example Response:

Get Images/AMIs

  • GET /api/cloud/:projectSlug/images?region=us-east-1&os_type=Amazon - Get images/AMIs for the project’s connected cloud provider
Path Parameters:
  • projectSlug (required): Project slug. The cloud provider is inferred from the project’s connected cloud connection.
Query Parameters:
  • region (optional): Region code (e.g., ‘us-east-1’). If omitted, returns images for all regions
  • os_type (optional): Filter by OS type. Available values:
    • AWS: Amazon, Ubuntu, RedHat, Debian, SUSE, Windows
    • GCP: Debian, Ubuntu, RedHat, SUSE, openSUSE, CentOS, Rocky, AlmaLinux, COS, Fedora, Windows. Populate via npm run fetch-gcp-images.
Authentication: Required (Bearer token) Example Requests:
Example Response:

Get Volume Types

  • GET /api/cloud/:projectSlug/volume-types?region=us-east-1 - Get volume types and pricing for the project’s connected cloud. AWS: gp3, gp2, io1, io2 (npm run fetch-volume-pricing). GCP: pd-standard, pd-balanced, pd-ssd, pd-extreme (npm run fetch-gcp-volume-pricing; needs Cloud Billing API).
Path Parameters:
  • projectSlug (required): Project slug. The cloud provider is inferred from the project’s connected cloud connection.
Query Parameters:
  • region (optional): Region code (e.g., ‘us-east-1’). If omitted, returns volume types for all regions
  • volume_type (optional): Filter by volume type (gp3, gp2, io1, io2)
  • resource_type (optional): Filter by resource type - ec2 for EC2 instances or db/rds for RDS databases
Authentication: Required (Bearer token) Example Requests:
Example Response:
Note: Volume types are stored separately for EC2 and RDS because they have different minimum size requirements:
  • EC2: All volume types (gp3, gp2, io1, io2) have a minimum size of 8GB
  • RDS: gp2/gp3 have a minimum size of 20GB, while io1/io2 have a minimum size of 100GB

Get Lambda Runtimes

  • GET /api/cloud/lambda-runtimes - Get all available Lambda runtimes
  • GET /api/cloud/lambda-runtimes?include_inactive=true - Include inactive runtimes
  • GET /api/cloud/lambda-runtimes?language=javascript - Filter by programming language
  • GET /api/cloud/lambda-runtimes?family=nodejs - Filter by runtime family
Query Parameters:
  • include_inactive (optional): Include inactive runtimes (default: false)
  • language (optional): Filter by programming language (javascript, python, java, csharp, go, ruby, custom)
  • family (optional): Filter by runtime family (nodejs, python, java, dotnet, go, ruby, provided)
Example Requests:
Example Response:
Supported Runtimes:
  • Node.js: nodejs20.x, nodejs18.x, nodejs16.x
  • Python: python3.12, python3.11, python3.10, python3.9
  • Java: java21, java17, java11, java8.al2
  • .NET: dotnet8, dotnet6
  • Go: go1.x
  • Ruby: ruby3.2
  • Custom: provided.al2, provided.al2023

Get Database Types

  • GET /api/cloud/:projectSlug/database-types - Get all database engine types (MySQL, PostgreSQL, MariaDB, etc.)
  • GET /api/cloud/:projectSlug/database-types?include_inactive=true - Get all database types including inactive ones
Path Parameters:
  • projectSlug (required): Project slug. Requires authentication; user must have access to the project.
Query Parameters:
  • include_inactive (optional): Include inactive database types (default: false)
Example Requests:
Example Response:

Get Database Versions

  • GET /api/cloud/:projectSlug/:environmentSlug/database-versions - Get available database engines and versions only (no instance types). Uses the project’s connected cloud provider (same as GET /api/cloud/:projectSlug/images).
  • GET /api/cloud/:projectSlug/:environmentSlug/database-versions?engine=mysql - Filter by engine (e.g. mysql, postgres)
  • GET /api/cloud/:projectSlug/:environmentSlug/database-versions?engine=mysql&region=us-east-1 - Filter by engine and region (AWS; region ignored for GCP)
Path Parameters:
  • projectSlug (required): Project slug. User must have access to the project.
  • environmentSlug (required): Environment slug. Environment must belong to the project.
Query Parameters:
  • engine (optional): Filter by engine code (e.g., ‘mysql’, ‘postgres’)
  • region (optional): Filter by region code (e.g., ‘us-east-1’); AWS only, ignored for GCP
  • include_inactive (optional): Include inactive engine versions (default: false)
Provider: The cloud provider is always taken from the project’s connected cloud connection (no provider query param). If the project has no connected cloud or the connection is not active, the API returns 400. Response: Returns engines and their versions only (no instance types, no per-region instance rows). Use database-instance-types for instance classes. Example Requests:
Example Response:

Get Database Instance Types

  • GET /api/cloud/:projectSlug/database-instance-types - Get available database instance types (AWS RDS or GCP Cloud SQL tiers)
  • GET /api/cloud/:projectSlug/database-instance-types?provider=aws&region=us-east-1 - AWS RDS (db.t3.micro, db.m5.large, etc.)
  • GET /api/cloud/:projectSlug/database-instance-types?provider=gcp - GCP Cloud SQL tiers (db-f1-micro, db-n1-standard-*, etc.)
Path Parameters:
  • projectSlug (required): Project slug. Requires authentication; user must have access to the project.
Query Parameters:
  • provider (optional): aws, gcp, or omit. If omitted, inferred from the project’s connected cloud; if no connection, defaults to aws. For GCP, returns Cloud SQL machine tiers (db-f1-micro, db-g1-small, db-n1-standard-, db-n1-highmem-, db-custom-*) with reference pricing (ZONAL and REGIONAL, USD/hr, us-central1); region is ignored; family filters by tier family (e.g. db-n1-standard, db-f1).
  • region (optional): Filter by region code (e.g., ‘us-east-1’); AWS only, ignored for GCP
  • family (optional): Filter by instance family (AWS: ‘db.t3’, ‘db.m5’; GCP: ‘db-n1-standard’, ‘db-f1’, ‘db-custom’)
  • page (optional): Page number for pagination (default: 1)
  • limit (optional): Items per page (default: 50, max: 100)
Features:
  • AWS: Instance specs, pricing by engine/deployment, metadata. GCP: Static tier list with vcpus/memoryGb and reference pricing (ZONAL/REGIONAL, USD/hr, us-central1) for mysql and postgres; region = “All GCP regions”.
  • Paginated results.
Example Requests:
Example Response: