Articles on: Troubleshooting

How to use the Galaxy GraphQL API?

Galaxy’s public API is a GraphQL endpoint that enables you to monitor your apps running on Galaxy and change their configurations. You can use it inside your app by following the steps in the Access and in the Authorization section in the documentation: API | Galaxy Docs .

Basically you create your API key in your Galaxy dashboard and after that you will be able to make the requests to the GraphQL API.

Each Galaxy region has a different URL and so each region also has a different endpoint.

US East: https://us-east-1.api.meteor.com/.
EU West: https://eu-west-1.api.meteor.com/.
Asia-Pacific: https://ap-southeast-2.api.meteor.com/.

To access the GraphQL HTTP endpoint you need to append /graphql to these URLs, for example, US East GraphQL endpoint is https://us-east-1.api.meteor.com/graphql.

You can also access the Explorer (GraphiQL) appending /explorer, for example, US East Explorer endpoint is https://us-east-1.api.meteor.com/explorer.

Just open https://us-east-1.api.meteor.com/explorer and you will see this screen:



Generate your API Key from your settings (https://galaxy.meteor.com/{username}/settings) and copy it:



Go back to the Explorer and set your API Key:



To see the first example running, add your username as required by the query, and execute it:



You will see in the data the result of the query below that expects a username and lists some information about your user and the apps you have:

query myUserApps($username:String!)
{
  user(username:$username) {
    accountLocked
    apps {
      _id
      hostname
      status
      containerCount
      url
    }
    activityCount
    appCount
  }
}


Updated on: 24/10/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!