Read 'source image update available' from api
ethereumdegen
PROOP

5 months ago

I have a railway instance using a docker package. When a new update (hash) is pushed to the docker pack, i can see a little button appear in railway ui about ''Source Image : Update Available" . A purple button in Settings.

When i click that, it works great it redeploys the node which uses the latest docker hash.

MY PROBLEM:

How the heck can i read/write this bool from the api? I have tried absolutely everything. serviceInstanceIsUpdateable, isUpdateable, etc etc i cannot find the bool in the api that matches the function of that purple button in the ui. Please help

P.S. it would be cool if there were a way we could easily figure out the api calll for any given button in the ui and / or if you provided an ai-agent friendly markdown file for your api docs.

Solved$10 Bounty

Pinned Solution

5 months ago

Hey, from what I've been able to investigate so far, the query that the dashboard uses is not publicly available. Also, you can determine how a query maps to the API by examining the network tab of the devtools inside the Railway dashboard, but this entirely depends on whether Railway exposes that query or not.

Basically, Railway has two GraphQL endpoints:

The internal endpoint can be used via API tokens, but I would not recommend it as Railway can change them at any time. However, if you really need that information, you could use the following query:

query dockerImageUpdateCheck($serviceId: String!, $environmentId: String!, $skipCache: Boolean) {
  serviceInstance(serviceId: $serviceId, environmentId: $environmentId) {
    imageUpdateStatus(skipCache: $skipCache)
  }
}

4 Replies

5 months ago

Hey, from what I've been able to investigate so far, the query that the dashboard uses is not publicly available. Also, you can determine how a query maps to the API by examining the network tab of the devtools inside the Railway dashboard, but this entirely depends on whether Railway exposes that query or not.

Basically, Railway has two GraphQL endpoints:

The internal endpoint can be used via API tokens, but I would not recommend it as Railway can change them at any time. However, if you really need that information, you could use the following query:

query dockerImageUpdateCheck($serviceId: String!, $environmentId: String!, $skipCache: Boolean) {
  serviceInstance(serviceId: $serviceId, environmentId: $environmentId) {
    imageUpdateStatus(skipCache: $skipCache)
  }
}

ethereumdegen
PROOP

5 months ago

ok hi @passos so i REALLY need this functionality because it is impacting my users negatively as they cannot see the upgrade status or anything for nodes so i am requesting this bool be available to read in the normal api ❤


Status changed to Solved brody 5 months ago


ethereumdegen

ok hi @passos so i REALLY need this functionality because it is impacting my users negatively as they cannot see the upgrade status or anything for nodes so i am requesting this bool be available to read in the normal api ❤

ethereumdegen
PROOP

5 months ago

okay btw i just realized im an idiot and i can just bypass this entire issue by having my node serve its version at /health so i dont need to check the docker pack version. But still it would be nice lol


Status changed to Awaiting Railway Response Railway 5 months ago


5 months ago

Unfortunately I don't think Railway will expose that query publicly, but happy to know that you found another solution!


Status changed to Solved passos 5 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...