R
Railway5mo ago
_mati

How to get data about all projects using Railway's API?

Hey! So, I'm automating some deployments on Railway, but I'm stuck trying to get all my account's projects. Despite of the lack of documentation, with most of the API calls, I basically replicated what's shown in the Network tab (I only changed the Authorization header and the URL path). But, with the "me" query, I'm unable to get the projects. I tried with the Postman collection you have, uncommenting the "projects" field, adding the fragment and so on, but still no luck. I know there's also a "projects" query in Postman, but I don't know what should do with the "edges" and "pageInfo" fields, since I couldn't find the query in the Network tab. Could I get your help, please?
Solution:
may i ask what is wrong with the dashboard query that the dashboard makes while on the dashboard?
Jump to solution
9 Replies
Percy
Percy5mo ago
Project ID: N/A
_mati
_matiOP5mo ago
N/A
Solution
Brody
Brody5mo ago
may i ask what is wrong with the dashboard query that the dashboard makes while on the dashboard?
_mati
_matiOP5mo ago
Also tried with the dashboard query (adapted to use graphql/v2 with my auth token, instead of the internal Railway's API that uses my cookies), but this is the response I'm getting:
{
"errors": [
{
"message": "Problem processing request",
"traceId": "325782497962424061"
}
]
}
{
"errors": [
{
"message": "Problem processing request",
"traceId": "325782497962424061"
}
]
}
I can send the body as well if needed
Brody
Brody5mo ago
fun fact, you can use the internal endpoint with your API token
_mati
_matiOP5mo ago
lol, problem solved may I ask why does it work with the internal endpoint, but not the "external" one?
Brody
Brody5mo ago
the public endpoint doesn't have a dashboard query, the error responses are just really bad is all, otherwise it would have told you it doesn't exist but the me query should do the same
_mati
_matiOP5mo ago
got it, so I'll use the internal endpoint - ty!
Brody
Brody5mo ago
sounds good!
Want results from more Discord servers?
Add your server