GraphQL API
mateodemuynck
PROOP

7 months ago

I'm trying to understand the Railway API before using it in an OPenSearch pipeline. Here is the request I'm trying to send for my tests :
graphql query { projects { edges { node { name } } } }

This request returns only 1 project in my Enterprise workspace but there are 10 inside and 3 in my personnal workspace. I also tried the request in Railway docs (even if the playground is reporting it as deprecated) and it returns only 3 random projects (2 inside my personnal workspace and 1 inside my enterprise workspace). I don't know if I'm doing something wrong or if there is a bug with the Railway API.

If there is an alternative for ingesting logs inside Opensearch that would save me some time it's even better !

Thanks for your help.

Solved$10 Bounty

27 Replies

mateodemuynck
PROOP

7 months ago

N/A


mateodemuynck
PROOP

7 months ago

Ok my bad I just found out my Token was bound to "No Workspace" (I still don't understand why the second command show me projects from my enterprise workspace but anyway)


mateodemuynck
PROOP

7 months ago

IS it possible to retrieve logs from the API ?


brody
EMPLOYEE

7 months ago

yes


mateodemuynck
PROOP

7 months ago

Thank you !


brody
EMPLOYEE

7 months ago

what do you plan to use them for?


mateodemuynck
PROOP

7 months ago

I want to ingest them in my OpenSearch using Filebeat


brody
EMPLOYEE

7 months ago

tell me more!


mateodemuynck
PROOP

7 months ago

My enterprise is trying to get certified so we need to get compliant. I need to centralize all the logs I can into our OpenSearch instance. On Railway I need Deployments Logs and HTTP Logs (no need for build logs)


mateodemuynck
PROOP

7 months ago

I didn't find any Filebeat or Logstash integration with Railway so I'm trying to gather all the logs I can using the API then sending them over HTTP or Syslog


passos
MODERATOR

7 months ago

Then Locomotive might be the best fit for your use case. While it doesn't support Filebeat or Logstash directly, it can push logs to any HTTP endpoint. Perhaps you could create a simple Railway function that pushes logs to OpenSearch directly or to Logstash.


brody
EMPLOYEE

7 months ago

it also doesnt support http logs.. yet 😉


mateodemuynck
PROOP

7 months ago

Awesome thank you so much !


mateodemuynck
PROOP

7 months ago

I'll try that


mateodemuynck
PROOP

7 months ago

Is there an easy way to gather the logs of all my Railway services or I need to input all my services ids manually ?


brody
EMPLOYEE

7 months ago

just use reference variables


brody
EMPLOYEE

7 months ago

${{.RAILWAY_SERVICE_ID}}


mateodemuynck
PROOP

7 months ago

And is it possible to gather logs from different projects ?


brody
EMPLOYEE

7 months ago

if you deploy locomotive into them


mateodemuynck
PROOP

7 months ago

I also get an error while trying to use Locomotive :

1390364575383158800
1390364575651598300


brody
EMPLOYEE

7 months ago

click the log for more info


mateodemuynck
PROOP

7 months ago

I also tried to use this template (with much more env variables) : https://railway.com/deploy/jP9r-f


brody
EMPLOYEE

7 months ago

yes its best to deploy with the template


brody
EMPLOYEE

7 months ago

please link to your locomotive service


mateodemuynck
PROOP

7 months ago

Oh that's my bad I forgot to put to put my ingest url🤦🏻‍♂️


brody
EMPLOYEE

7 months ago

that would do it


brody
EMPLOYEE

7 months ago

!s


Status changed to Solved brody 7 months ago


Loading...