Dispra Docs

Cloud

The service object

A service is one app that runs in an environment: built from a GitHub repository or run from a container image, on one or more replicas, in one or more regions.

Attributes

  • svc string: The service's id.
  • name string: Its name, unique in the environment.
  • env string: The environment it runs in.
  • source_kind string: repo (built from GitHub) or image (a container image).
  • dep string: Its latest deployment, or empty before the first.
  • dep_state string: That deployment's state: queued, building, starting, live, failed, superseded, rolled_back or cancelled.
  • cpu_millis number: CPU per replica in millicores (1000 = one core).
  • memory_mb number: Memory per replica in MB.
  • replicas number: Replicas in the project's region.
  • hostname string: Its generated public address.
  • group string: Its service group, or null.

Example

{
  "data": {
    "svc": "svc_01jdk3n2f4g6h8j0k2l4z6x8ca",
    "name": "api",
    "env": "env_01jdk3m9x5h2p8r4t6y1u3i0oa",
    "source_kind": "repo",
    "dep": "dep_01jdk4p7q9w1e3r5t7y9u1i3ob",
    "dep_state": "live",
    "cpu_millis": 1000,
    "memory_mb": 1024,
    "replicas": 2,
    "hostname": "api-x8ca.in.dispracloud.app",
    "group": "grp_01jdk5e2r4t6y8u0i2o4p6a8sd"
  }
}

Endpoints