Service
A service is a single container definition inside a stack.
All requests go to the Run-App gateway and need the authentication headers.
Service List
Query · container_listService
Returns the services belonging to a stack.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
stackId | String | Yes | The ID of stack |
subscriptionId | String | Yes | The ID of subscription |
In the query below, the second argument is named subscription, not
subscriptionId. This is reproduced from the source as-is; verify the correct
argument name against the live schema.
Variables
{
"subscriptionId": "67ab067f092e8f8c2beb2df5",
"stackId": "67501d3de6d872adef006ff6"
}
Request
query Services($stackId: String!, $subscriptionId: String!) {
container_listService(stackId: $stackId, subscription: $subscriptionId) {
services {
id
stackId
serviceName
image
isPrivateRegistry
containerRegistry {
containerRegistryId
containerRegistryProvider
}
entrypoint
status
replicas
domain {
domainName
containerPort
}
environment {
envKey
envValue
}
restartPolicy {
condition
delay
maxAttempt
restartWindow
}
createdAt
resource {
cpu
memory
}
updatedAt
}
}
}
Response
{
"data": {
"container_listService": {
"services": [
{
"id": "674eb1017cfccb9f31fa1c90",
"stackId": "672c7b16a0deed3f1f3d6961",
"serviceName": "service_02",
"image": "node:16",
"isPrivateRegistry": true,
"containerRegistry": {
"containerRegistryId": "672b2dd0a706d0ef04a59c3d",
"containerRegistryProvider": "docker_hub"
},
"entrypoint": "entrypoint02",
"status": 2,
"replicas": 1,
"domain": {
"domainName": "domain02.com",
"containerPort": 80
},
"environment": [
{
"envKey": "api",
"envValue": "127.1.1.1/graphql"
}
],
"restartPolicy": {
"condition": "none",
"delay": "5s",
"maxAttempt": 5,
"restartWindow": "120s"
},
"createdAt": 1733210369846,
"resource": {
"cpu": 0.5,
"memory": 512
},
"updatedAt": 1733210369841
}
]
}
}
}
Start Service
Mutation · container_startServiceById
Starts a single service.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
subscriptionId | String | Yes | ID of subscription |
serviceId | String | Yes | The ID of service |
Variables
{
"subscriptionId": "67ab067f092e8f8c2beb2df5",
"stackId": "67501d3de6d872adef006ff6"
}
This sample is reproduced from the source, which sends stackId even though the
mutation takes serviceId. Send serviceId unless the live schema says
otherwise.
Request
mutation startServiceById($subscriptionId: String!, $serviceId: String!) {
container_startServiceById(
subscriptionId: $subscriptionId
serviceId: $serviceId
) {
message
success
}
}
The source does not include an example response for this operation.
Stop Service
Mutation · container_stopServiceById
Stops a single service.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
subscriptionId | String | Yes | ID of subscription |
serviceId | String | Yes | The ID of service |
Variables
{
"subscriptionId": "67ab067f092e8f8c2beb2df5",
"stackId": "67501d3de6d872adef006ff6"
}
As with Start Service, this sample sends stackId although the mutation takes
serviceId.
Request
mutation stopServiceById($subscriptionId: String!, $serviceId: String!) {
container_stopServiceById(
subscriptionId: $subscriptionId
serviceId: $serviceId
) {
message
success
}
}
The source does not include an example response for this operation.
Service Log
Query · container_getServiceLogById
Returns the status log and output log for a service.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
subscriptionId | String | Yes | ID of subscription |
serviceId | String | Yes | The ID of the service |
lineLimit | Int | No | The number of the line limit |
Variables
{
"subscriptionId": "67ab067f092e8f8c2beb2df5",
"serviceId": "26d7c0fef0b997c90679b0b4",
"lineLimit": 100
}
Request
query Container_getServiceLogById(
$subscriptionId: String!
$serviceId: String!
$lineLimit: Int
) {
container_getServiceLogById(
subscriptionId: $subscriptionId
serviceId: $serviceId
lineLimit: $lineLimit
) {
statusLog {
message
state
createdAt
}
log {
message
state
createdAt
}
}
}
Response
{
"data": {
"container_getServiceLogById": {
"statusLog": {
"message": "starting container failed: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: \"entrypoint02\": executable file not found in $PATH: unknown",
"state": "failed",
"createdAt": 1733214539960
},
"log": {
"message": "starting container failed: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: \"entrypoint02\": executable file not found in $PATH: unknown",
"state": "failed",
"createdAt": 1733214539960
}
}
}
}