8 months ago
I am trying to spin up an instance and attach a docker image to it via the public API.
I managed to spin up the instance but docker is not attached. No idea why as all serviceConnect request seems to return 400 with a generic response
Pinned Solution
8 months ago
Have you tried providing the input variables directly?
mutation serviceConnect {
serviceConnect(
id: "service-id",
input: {
image: "docker url thing"
}
) {
id
}
}You can find the documentation here.
9 Replies
8 months ago
Hey there! We've found the following might help you get unblocked faster:
- 🧵 HTTP Basic Authentication
- 📚 Configure Healthchecks
- 🧵 400 Bad Request when trying to update a service instance
If you find the answer from one of these, please let us know by solving the thread!
8 months ago
can you provide logs? railsway logs --build
8 months ago
Hey. Sorry. I couldn't reply yesterday cause I hit the limit of creating a new service.
I am using the graphql and not
railwaycli.The response was:
{
"phase": "response",
"operationName": "ServiceConnect",
"httpStatus": 400,
"headers": {
"access-control-allow-credentials": "true",
"access-control-allow-origin": "https://railway.com",
"cache-control": "no-store",
"cf-cache-status": "DYNAMIC",
"cf-ray": "984f2069baad40d8-SIN",
"connection": "keep-alive",
"content-length": "86",
"content-type": "application/json; charset=utf-8",
"date": "Fri, 26 Sep 2025 01:53:15 GMT",
"server": "cloudflare",
"vary": "Origin, Accept-Encoding",
"via": "1.1 google",
"x-ratelimit-limit": "1000",
"x-ratelimit-remaining": "997",
"x-ratelimit-reset": "2025-09-26T02:53:15.114Z"
},
"body": {
"errors": [
{
"message": "Problem processing request",
"traceId": "1402431938152308359"
}
]
}
}
tlkiong
> Hey. Sorry. I couldn't reply yesterday cause I hit the limit of creating a new service. > > I am using the graphql and not `railway` cli. > The response was: > > `{` > > ` "phase": "response",` > > ` "operationName": "ServiceConnect",` > > ` "httpStatus": 400,` > > ` "headers": {` > > ` "access-control-allow-credentials": "true",` > > ` "access-control-allow-origin": "https://railway.com",` > > ` "cache-control": "no-store",` > > ` "cf-cache-status": "DYNAMIC",` > > ` "cf-ray": "984f2069baad40d8-SIN",` > > ` "connection": "keep-alive",` > > ` "content-length": "86",` > > ` "content-type": "application/json; charset=utf-8",` > > ` "date": "Fri, 26 Sep 2025 01:53:15 GMT",` > > ` "server": "cloudflare",` > > ` "vary": "Origin, Accept-Encoding",` > > ` "via": "1.1 google",` > > ` "x-ratelimit-limit": "1000",` > > ` "x-ratelimit-remaining": "997",` > > ` "x-ratelimit-reset": "2025-09-26T02:53:15.114Z"` > > ` },` > > ` "body": {` > > ` "errors": [` > > ` {` > > ` "message": "Problem processing request",` > > ` "traceId": "1402431938152308359"` > > ` }` > > ` ]` > > ` }` > > `}`
8 months ago
Please share the GraphQL request you are making.
8 months ago
mutation ServiceConnect($id: String!, $input: ServiceConnectInput!) {
serviceConnect(id: $id, input: $input) {
__typename
id
name
projectId
updatedAt
}
}
Would the above be sufficient?
tlkiong
`mutation ServiceConnect($id: String!, $input: ServiceConnectInput!) {` ` serviceConnect(id: $id, input: $input) {` ` __typename` ` id` ` name` ` projectId` ` updatedAt` ` }` `}` Would the above be sufficient?
8 months ago
Have you tried providing the input variables directly?
mutation serviceConnect {
serviceConnect(
id: "service-id",
input: {
image: "docker url thing"
}
) {
id
}
}You can find the documentation here.
8 months ago
Thanks. Let me try