Documentation menu

Remove service instance

DELETEhttps://api.instacloud.com/projects/{projectId}/services/{serviceId}/instances/{instanceId}

Token scope: account · org · project — read-only tokens refused (not a GET).

Stop one named compute instance. The last instance cannot be removed.

Parameters

NameInTypeRequiredDescription
projectIdpathstringyes
serviceIdpathstringyes
instanceIdpathstringyesinstance id, as per-instance metrics and logs report it

Responses

200

Default Response

FieldTypeRequiredDescription
serviceobjectnoA project-level service (postgres | storage | compute | redis | mysql | mongodb).
service.idstringno
service.project_idstringno
service.type"postgres" | "storage" | "compute" | "redis" | "mysql" | "mongodb"no
service.namestringno
service.specobjectnocompute: {cpu_kind,cpus,memory_mb}; postgres: sized by its instance ceiling (cpuMilli/memoryMib)
service.machine_countintegernocompute only
service.desired_state"running" | "stopped" | "suspended"nocompute only — developer-set lifecycle intent
service.always_onbooleannocompute and managed databases (redis, mysql, mongodb) — true: machines never scale to zero; false: idle machines suspend and wake on request. A new compute service is born false (scale-to-zero, except a worker); a new managed database is born from INSTA_DB_ALWAYS_ON_DEFAULT (true on InstaCloud). Postgres is not recorded here: its idle mode lives on the database instance (GET /projects/{projectId}/database/instance, scaleToZero). Billing is actual usage either way.
service.websocketboolean | nullnocompute only — the app speaks WebSocket, so its machines carry connections-based concurrency and a 512 MB guest floor. Re-asserted by any redeploy given no flag, including restart. null: never recorded.
service.endpoint"http" | "tcp" | "udp" | "tcp+udp" | nullnocompute only — how the service is reached. http: Host-routed HTTPS at `domain`. tcp / udp / tcp+udp: raw TCP, UDP, or both at `endpoint_host`:`port` on the service’s own public IPv6 address (IPv6 clients only; no TLS from the platform, no custom domain, no WebSocket flag). Chosen at create, and changed by a deploy that passes `endpoint`. null: never chosen, which is http.
service.endpoint_hoststring | nullnocompute, endpoint tcp/udp/tcp+udp only — the host to reach on `port` (an IPv6-only name), set once a deploy has confirmed it; null otherwise
service.regionstring | nullno
service.domainstring | nullnodefault access domain (postgres/compute)
service.publicbooleannostorage — bucket(s) served with anonymous public-read; managed databases — the database port is exposed on a public address (on insta-compute, false = reachable only over the private network, *_PRIVATE_URL); postgres — the public endpoint accepts connections (true by default; false = not reachable from the internet, private network lane only); compute — the service answers the internet at its URL / endpoint_host (true by default; false = the URL answers 403 and never wakes it, and only services in the same branch reach it, at private_host). Change it with PUT .../services/{serviceId}/access
service.private_hoststring | nullnocompute and managed databases on insta-compute — the name other services in the SAME project branch reach this one at, on `port` over TCP: `<name>.insta.internal` for compute, `<name>-<type>.insta.internal` for a managed database (redis/mysql/mongodb). Other branches and projects cannot reach it. Resolves through the search domain every service is started with; tools that skip the search list (nslookup, dig) need private_fqdn. null: the service has no private address (a worker, a name ending in '-', a service not yet back-filled, or a region without the private network)
service.private_fqdnstring | nullnocompute and managed databases on insta-compute — the fully-qualified form of private_host, `<private name>.<network>.insta.internal`, for clients that do not use the search domain. null whenever private_host is
service.imagestring | nullnocompute only — container image currently run
service.portinteger | nullnocompute/managed database — compute image port, or the private database TCP port
service.start_commandstring | nullnoRuntime startup override, run via sh -c; on insta-compute it runs in place of the image's ENTRYPOINT and CMD: a wrapper entrypoint (e.g. docker-entrypoint.sh) does not run while it is set. null restores the image's own ENTRYPOINT and CMD. Stored as readable service settings.
service.volume_applied_mount_pathstring | nullnoLast successfully confirmed Compute mount path; null means unknown, not proof of a changed path.
service.volume_mount_pathstring | nullnoCompute volume mount path; null or omitted means /data for legacy volumes. Changes apply on deployment.
service.volume_gibinteger | nullnocompute/managed database — size (whole Gi) of the persistent data volume; null = no volume. Compute can attach/grow via PUT .../volume; managed databases are platform-managed in v1
service.pg_versioninteger | nullnopostgres only — the Postgres MAJOR version the service runs (e.g. 16), known before the instance is ever connected to or woken. Pick client tooling (pg_dump/pg_restore/psql) of the same major. null: never recorded (a legacy row). The exact server_version of a RUNNING instance is on GET .../database/metrics
service.template_deployment_idstring | nullnothe template deployment that created this service (survives branch clones); null for services created directly
service.template_modifiedbooleannotrue once the service was reconfigured away from its template-deployed spec
service.template_codestring | nullnothe template this service was deployed from; null for services created directly, and for one whose deployment record has been pruned
service.template_logo_urlstring | nullnothe template's mark; null when the template is not in the registry (or carries no logo). Official templates: a commit-pinned jsDelivr URL (TEMPLATE_LOGO_HOST). Community templates: any https:// link the author set. Joined live rather than stored, because a republish moves it
service.template_namestring | nullnothe template's name as the registry spells it, for a surface people read; null when the template is not in the registry, or its manifest omits a name. Read from the manifest the registry serves NOW, beside the logo, because a republish can rename it
service.template_versionstring | nullnothe template version this instance was deployed from; null for a service created directly. Read from the deployment record, so it does not move when the registry is republished
service.template_latest_versionstring | nullnothe version the registry serves for this template now; null when the registry does not serve it — absent, unpublished or taken down. The row still reports template_code and template_name in those cases, because attribution of a resource its owner deployed is not catalog visibility. For display beside template_version, never for deciding whether an update exists
service.template_update_availablebooleannotrue when upgrading this service's template deployment to the version the registry serves now would actually change something about the services it runs: a setting the new manifest would write, an environment variable it would write differently, a service it would add, or a variable it now requires that this instance holds no value for. A republish that only moved presentation is not an update, because applying it would change nothing, and neither is a new version string on identical content, which is what every community republish produces. False whenever the answer cannot be determined: a template absent from the registry, unpublished, taken down, a manifest this version of the platform cannot parse, or a registry read that failed. False too while the deployment's own run has not succeeded, because what an unfinished deploy needs is a retry, not an upgrade
service.sourceobjectnocompute only — where the running image comes from: an image somebody deployed (type=image) or a connected repository (type=github). Full resource: GET /projects/{id}/services/{serviceId}/source
service.source.type"image" | "github"yes
service.source.ownerstringno
service.source.repostringno
service.source.branchstringnothe repo branch this service tracks
service.source.auto_deploybooleannoa push to `branch` rebuilds and redeploys the service
service.status"creating" | "active" | "error" | "deleting" | "deleted"no
service.created_atstringno

202

Default Response

FieldTypeRequiredDescription
statusstringyes
approvalIdstringyes
actionstringyes
actionsstring[]yes
messagestringyes
urlstringyes

400

Default Response

FieldTypeRequiredDescription
errorstringyes

403

Default Response

FieldTypeRequiredDescription
errorstringyes

404

Default Response

FieldTypeRequiredDescription
errorstringyes

409

Default Response

FieldTypeRequiredDescription
errorstringyes

View as Markdown