GraphQL API

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 :

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

N/A


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)


IS it possible to retrieve logs from the API ?


a year ago

yes


Thank you !


a year ago

what do you plan to use them for?


I want to ingest them in my OpenSearch using Filebeat


a year ago

tell me more!


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)


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


a year 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.


a year ago

it also doesnt support http logs.. yet 😉


Awesome thank you so much !


I'll try that


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


a year ago

just use reference variables


a year ago

${{.RAILWAY_SERVICE_ID}}


And is it possible to gather logs from different projects ?


a year ago

if you deploy locomotive into them


I also get an error while trying to use Locomotive :

1390364575383158794

1390364575651598416


a year ago

click the log for more info


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


a year ago

yes its best to deploy with the template


a year ago

please link to your locomotive service


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


a year ago

that would do it


10 months ago

!s


Status changed to Solved brody 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...