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
svcstring: The service's id.namestring: Its name, unique in the environment.envstring: The environment it runs in.source_kindstring: repo (built from GitHub) or image (a container image).depstring: Its latest deployment, or empty before the first.dep_statestring: That deployment's state: queued, building, starting, live, failed, superseded, rolled_back or cancelled.cpu_millisnumber: CPU per replica in millicores (1000 = one core).memory_mbnumber: Memory per replica in MB.replicasnumber: Replicas in the project's region.hostnamestring: Its generated public address.groupstring: 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
POSTAdd a custom domainPOSTAdd a regionPOSTAttach a volumePOSTCancel a deploymentPATCHChange an endpoint's portGETCheck a file on the branchGETCheck an address namePOSTCreate a deploymentPOSTCreate a servicePOSTCreate an endpointDELETEDelete a serviceDELETEDelete a service variableDELETEDelete an endpointDELETEDetach a volumeGETGet a deploymentGETGet a serviceGETGet service metricsGETGet service settingsGETGet the image's portGETList deploymentsGETList endpointsGETList logsGETList recent commitsGETList service regionsGETList service variablesGETList servicesPUTMove a service to a groupPOSTOpen a shellPOSTPreview a custom domainPOSTRegenerate an endpointDELETERemove a regionPOSTRestart a servicePOSTReveal a service variablePOSTReveal all service variablesPATCHSet a region's replicasPUTSet a service variablePUTSet service limitsPOSTStart a servicePOSTStop a serviceGETStream a service's logsPOSTTest a health checkPATCHUpdate service settingsPOSTValidate variables text