Overview
The StrataGateway REST API is being designed around resource-oriented endpoints, predictable HTTP semantics, and JSON request and response bodies.
Base URL
Illustrative Preview Base URL
Base URL
https://api.stratagateway.com/v1The final production API hostname and versioning strategy may change before public release. Do not interpret this endpoint as currently available.
Authentication
In Development
The StrataGateway API is planned to use Bearer token authentication. Include the token in the Authorization header on every request.
Authorization header
Authorization: Bearer $STRATA_API_TOKENExample request
curl "https://api.stratagateway.com/v1/instances" \
-H "Authorization: Bearer $STRATA_API_TOKEN"Security
API tokens must be treated as secrets and should never be committed to source control or exposed in client-side applications.
Planned token capabilities
PlannedRequest format
All request bodies use JSON. Include the following headers:
Required headers
Content-Type: application/json
Accept: application/jsonIllustrative request body for creating an instance:
Illustrative request body
{
"name": "web-prod-01",
"region": "fra-1",
"plan": "compute-standard",
"image": "ubuntu-24.04-lts"
}The example above is illustrative. Field names, types, and requirements may change before public release.
Resource model
The API follows a resource-oriented structure. Planned resource collections include:
Planned resources
PreviewResources are identified by prefixed IDs. The format below is illustrative.
Illustrative identifier format
Instances
inst_7a91c2
Networks
net_52a8f1
Firewalls
fw_82c9a1
SSH Keys
key_8f3a9b1c
Not every resource exists today. Respect the documentation status badges on individual resource documentation pages.
Creating an instance
Provision a new compute instance using the planned instances collection.
Create instance request
curl -X POST "https://api.stratagateway.com/v1/instances" \
-H "Authorization: Bearer $STRATA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "web-prod-01",
"region": "fra-1",
"plan": "compute-standard",
"image": "ubuntu-24.04-lts",
"ssh_keys": ["key_8f3a9b1c"]
}'Illustrative response preview
Create instance response
{
"id": "inst_7a91c2",
"name": "web-prod-01",
"status": "provisioning",
"region": "fra-1",
"plan": "compute-standard",
"image": "ubuntu-24.04-lts"
}Infrastructure provisioning is expected to be asynchronous. The initial response returns a provisioning status. Final provisioning times are not yet defined and may vary by region, plan, and platform load.
Retrieving resources
List all instances or retrieve a single instance by its identifier.
List instances
List instances
curl "https://api.stratagateway.com/v1/instances" \
-H "Authorization: Bearer $STRATA_API_TOKEN"Get instance
Get instance
curl "https://api.stratagateway.com/v1/instances/inst_7a91c2" \
-H "Authorization: Bearer $STRATA_API_TOKEN"Illustrative response
Get instance response
{
"id": "inst_7a91c2",
"name": "web-prod-01",
"status": "running",
"region": "fra-1",
"ipv4": "203.0.113.10"
}The example IP 203.0.113.10 is a documentation-only address from the reserved range (RFC 5737) and does not represent a real StrataGateway instance.
Updating resources
Planned PATCH semantics
Partial updates are planned using PATCH. The set of editable fields is still being finalized.
Update instance
curl -X PATCH "https://api.stratagateway.com/v1/instances/inst_7a91c2" \
-H "Authorization: Bearer $STRATA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "web-prod-primary"
}'Update semantics and editable resource fields are still being finalized.
Deleting resources
Delete an instance by its identifier.
Delete instance
curl -X DELETE "https://api.stratagateway.com/v1/instances/inst_7a91c2" \
-H "Authorization: Bearer $STRATA_API_TOKEN"Irreversible action
Deleting infrastructure resources may be irreversible. Attached persistent storage behavior will depend on final storage semantics.
Errors
Illustrative error model
The API is planned to return a consistent error structure:
Error response
{
"error": {
"code": "validation_error",
"message": "The region field is required.",
"request_id": "req_91ab3c"
}
}Example HTTP status codes (illustrative):
The error schema is not finalized and may change before public release.
Pagination
Planned cursor-based model
List endpoints are expected to use cursor-based pagination:
Pagination request
GET /v1/instances?limit=50&cursor=...Illustrative response
Pagination response
{
"data": [],
"pagination": {
"next_cursor": "cursor_example",
"has_more": false
}
}Final pagination semantics are still under development.
Rate limits
Control-plane safety enforcement
The control plane enforces technical rate limits to protect reliability and prevent abuse. These are internal safety controls, not customer resource quotas or a commercial request allowance.
Exact technical values may change. Rate-limited responses use 429 Too Many Requests and a calculated Retry-After header; exact values are not a commercial allowance. Informational headers such as X-RateLimit-Limit,X-RateLimit-Remaining) are not part of the current customer contract.
Idempotency
Planned behavior
Infrastructure creation endpoints are intended to support idempotency keys to prevent accidental duplicate resource creation on retries.
Idempotency header
Idempotency-Key: deploy-web-prod-01Repeated requests using the same key are intended to return the original response without creating additional infrastructure. This behavior is planned and not yet implemented.
API versioning
The preview API path uses explicit versioning:
Version prefix
/v1API versioning is intended to allow the platform to evolve without silently breaking integrations. Breaking changes will be introduced in new versions. Indefinite backwards compatibility is not guaranteed.
SDK and tooling
Planned developer tooling integrates with the REST API:
CLI
PlannedCommand-line workflows for provisioning and operational automation
TypeScript SDK
PlannedJavaScript and TypeScript developer tooling for API integration
Python SDK
PlannedPython client workflows for infrastructure automation
Terraform Provider
PlannedInfrastructure-as-code coverage for declarative provisioning
Was this page helpful?