Galaxy
Meteor

GraphQL API

Monitor your Meteor apps and manage configurations programmatically using Galaxy's public GraphQL API.

Want to automate your Galaxy workflows? The public GraphQL API lets you monitor your Meteor apps and change their configurations without touching the dashboard. Perfect for building custom tooling, automated deployments, or integrating Galaxy into your existing systems.

API access is only available for Professional plan apps.

Regional Endpoints

Galaxy operates in multiple regions, and each has its own API endpoint. Use the one matching where your apps are deployed:

Base URL: https://us-east-1.api.meteor.com/

  • GraphQL endpoint: https://us-east-1.api.meteor.com/graphql
  • Explorer (GraphiQL): https://us-east-1.api.meteor.com/explorer

Base URL: https://eu-west-1.api.meteor.com/

  • GraphQL endpoint: https://eu-west-1.api.meteor.com/graphql
  • Explorer (GraphiQL): https://eu-west-1.api.meteor.com/explorer

Base URL: https://ap-southeast-2.api.meteor.com/

  • GraphQL endpoint: https://ap-southeast-2.api.meteor.com/graphql
  • Explorer (GraphiQL): https://ap-southeast-2.api.meteor.com/explorer

You can also connect Apollo DevTools by opening your browser at the API base URL.

Getting Your API Key

Before making any requests, you need an API key. Each Galaxy region is independent, so you'll have a different key for each region where you deploy apps.

Open Account Settings

Go to your Galaxy dashboard and navigate to your Account Settings at https://galaxy.meteor.com/{username}/settings (replace {username} with your actual username or organization name).

Generate Your Key

Click Generate Key to create your API key. Copy it somewhere safe, you'll need it for all API requests.

Keep your API key secure. Anyone with this key can access and modify your apps.

Using the Explorer

The easiest way to explore the API is through the built-in GraphiQL Explorer. No code required!

Open the Explorer

Visit the Explorer URL for your region. For US East, that's us-east-1.api.meteor.com/explorer.

Set Your API Key

Look for the API key field in the bottom right corner of the Explorer. Paste your key there.

Run Your First Query

Try this query to see your apps. Add your username in the Variables panel and hit the play button:

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

Variables:

{
  "username": "YOUR_USERNAME"
}

The Explorer is great for testing queries before using them in your code. Play around with the schema documentation on the left side to discover all available queries and mutations.

Making API Requests

Ready to integrate the API into your app or scripts? Here's how to make authenticated requests.

Using cURL

A quick way to test from your terminal:

curl \
  -X POST \
  -H "Content-Type: application/json" \
  -H "galaxy-api-key: YOUR_API_KEY" \
  --data '{ "query": "{ user(username:\"YOUR_USERNAME\"){ _id username runningAppCount }}" }' \
  https://us-east-1.api.meteor.com/graphql

Replace YOUR_API_KEY with your key and YOUR_USERNAME with your username.

Using JavaScript

Here's how you might call the API from a Node.js app or Meteor method:

const response = await fetch('https://us-east-1.api.meteor.com/graphql', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'galaxy-api-key': process.env.GALAXY_API_KEY,
  },
  body: JSON.stringify({
    query: `
      query getApps($username: String!) {
        user(username: $username) {
          apps {
            hostname
            status
            containerCount
          }
        }
      }
    `,
    variables: { username: 'your-username' },
  }),
});

const { data } = await response.json();
console.log(data.user.apps);

Alternative: API Key as Variable

Can't set custom headers in your environment? You can pass the API key as a GraphQL variable instead:

query myUserApps($username: String!, $galaxyApiKey: String!) {
  user(username: $username) {
    apps {
      hostname
      status
    }
  }
}

This is especially handy when using Apollo DevTools or other GraphQL clients with header limitations.

Example Queries

Here are some useful queries to get you started:

Get App Status

query appStatus($hostname: String!) {
  app(hostname: $hostname) {
    status
    containerCount
    version
    lastDeployedAt
  }
}

List All Apps

query allApps($username: String!) {
  user(username: $username) {
    apps {
      _id
      hostname
      status
      url
      containerCount
    }
    runningAppCount
  }
}

What's Next?