Documentation Index
Fetch the complete documentation index at: https://docs.gateways.app/llms.txt
Use this file to discover all available pages before exploring further.
Unified Resources Endpoints
Resources are listed by project and environment (workspace/project-based API). There is no global list endpoint. Use the resource-by-ID endpoints for get, update, and delete instead of type-specific APIs (e.g./servers/:id, /databases/:id).
GET /api/resources/summary- Get summary statistics of resourcesGET /api/:projectSlug/:environmentSlug/resources- List all resources for a specific project and environmentGET /api/:projectSlug/:environmentSlug/resources/:resourceId- Get a resource by IDPATCH /api/:projectSlug/:environmentSlug/resources/:resourceId- Update a resource (name, position)PATCH /api/:projectSlug/:environmentSlug/resources/:resourceId/position- Update position only (body:{ "x": number, "y": number })PUT /api/:projectSlug/:environmentSlug/resources/:resourceId/sync- Sync resource data from cloud providerDELETE /api/:projectSlug/:environmentSlug/resources/:resourceId- Delete a resourceGET /api/resource-types- List resource types (subtype, isActive, minPlanId) — public, no auth; validate before creating resources
Resource Types (validate before create)
Resource types are stored in aresource_types table with columns: subtype, is_active, min_plan_id. Before creating any resource, the API validates that the workspace’s plan meets the minimum for that type and that the type is active.
GET /api/resource-types — List all resource types. Public — no authentication required.
Query:
activeOnly:true|false— defaulttrue, only return active typesworkspaceId: number — optional; if provided and the request includes a valid Bearer token, each type includescanCreate: booleanfor that workspace
?workspaceId=1 and a valid Bearer token, each item includes "canCreate": true|false.
GET /api/resource-types/:subtype — Get a single resource type by subtype. Public — no authentication required.
List Resources
List all resources for a project and environment. Use this endpoint to list resources (instances, databases, cache servers, applications, etc.) within a project. Query Parameters:type(optional): Filter by resource type (instances,databases,cache_servers,applications,terminals,firewalls,storage_buckets,bucket_explorers,db_monitors,static_websites, orall). Default:allregion(optional): Filter by regionstatus(optional): Filter by status (for instances and databases)state(optional): Filter by state (for resource types that expose astatefield)
instance), metadata is the resource table metadata as stored (e.g. instanceType, imageId, volumeType, storageSize, osType, osName, osVersion, vcpus, memoryGb, pricePerHour, publicIp, privateIp, launchTime, securityGroupId, state).
Scalable servers (resourceType scalable_server) use the same metadata shape as servers (instanceType, publicIp, privateIp, imageId, launchTime, securityGroupId, state, volumeType, storageSize, osType, osName, osVersion, vcpus, memoryGb, pricePerHour) plus scalable-specific fields (minSize, maxSize, desiredCapacity, currentCapacity, instances, volumeSize, status, etc.).
Get Resource by ID
Get detailed information about a resource by its database ID. Use this instead of type-specific APIs likeGET /servers/:id or GET /databases/:id.
Path: GET /api/:projectSlug/:environmentSlug/resources/:resourceId
Path Parameters:
projectSlug,environmentSlug: Project and environment – RequiredresourceId: Database ID of the resource (numeric) – Required. Get IDs from the list endpoint.
Update Resource by ID
Update a resource’s name and/or position. UsePATCH .../resources/:resourceId/position to update canvas position only. Note: Name cannot be updated for storage_bucket or static_website (S3 bucket name is fixed at creation); use the type-specific PATCH endpoints for those resources.
Path: PATCH /api/:projectSlug/:environmentSlug/resources/:resourceId
Body: { "name"?: string, "position"?: { "x": number, "y": number } } — at least one required.
Example:
Sync Resource from Cloud Provider
Sync/refresh resource data from the cloud provider (AWS, GCP, or Azure) and update the resource record in the database. This endpoint fetches the latest status, metadata, and configuration from the cloud provider and updates the resource accordingly. Path:PUT /api/:projectSlug/:environmentSlug/resources/:resourceId/sync
Supported Resource Types:
database- Syncs AWS RDS, GCP Cloud SQL, or Azure Flexible Serverinstance- Syncs AWS EC2 instancesscalable_server- Syncs AWS Auto Scaling Groups, GCP Managed Instance Groups, or Azure VM Scale Setscache_server- Syncs AWS ElastiCache Serverless, GCP Memorystore Redis, or Azure Cache for Redisfunction- Syncs AWS Lambda, GCP Cloud Functions, or Azure Functions
projectSlug,environmentSlug: Project and environment – RequiredresourceId: Database ID of the resource (numeric) – Required
- The sync endpoint updates the resource’s
statusandmetadatafields with the latest information from the cloud provider - For databases, it syncs endpoint, port, instance class, allocated storage, engine version, and other configuration details
- For instances, it syncs public IP, private IP, instance type, and state
- For scalable servers, it syncs min/max size, desired capacity, current capacity, and instance details
- For cache servers, it syncs endpoint, port, engine version, and status
- For functions, it syncs runtime, handler, memory size, timeout, endpoint/function URL, and status
- If a resource is not found in the cloud provider, the status is updated to
deleted
Delete Resource by ID
All resource deletion is performed only through this endpoint. Do not use type-specific delete APIs (e.g.DELETE /servers/:id, DELETE /databases/:id); those have been removed.
Delete a resource by its database ID. The service performs cloud deletion where applicable (terminate instance, delete RDS, remove S3 bucket, delete DNS zone, etc.), removes associated resource connections, then soft-deletes the resource. Supported types include: instance, database, terminal, bucket_explorer, db_monitor, application, firewall, cache_server, scalable_server, storage_bucket, static_website, function, dns, subdomain, and others.
Path: DELETE /api/:projectSlug/:environmentSlug/resources/:resourceId
Query parameters:
forceDelete(optional): Forscalable_serveronly. Set totrueto force delete the Auto Scaling Group even if instances are still running. Default:false.deleteFromCloud(optional): Forstorage_bucketandstatic_websiteonly. Set tofalseto only remove the resource from the database (and its connections); the bucket is not deleted from the cloud. Default:true.
Resource Summary
Get summary statistics of all resources. Example Request:/api/resources endpoint now returns project and environment as objects with id, slug, and name instead of just IDs. This provides more complete information and allows you to use slugs for navigation.
Example Response: