<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>The Grafana Alloy HTTP endpoints on Grafana Labs</title><link>https://grafana.com/docs/alloy/v1.17/reference/http/</link><description>Recent content in The Grafana Alloy HTTP endpoints on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/alloy/v1.17/reference/http/index.xml" rel="self" type="application/rss+xml"/><item><title>GraphQL API</title><link>https://grafana.com/docs/alloy/v1.17/reference/http/graphql/</link><pubDate>Wed, 17 Jun 2026 08:38:37 +0000</pubDate><guid>https://grafana.com/docs/alloy/v1.17/reference/http/graphql/</guid><content><![CDATA[&lt;h1 id=&#34;graphql-api&#34;&gt;GraphQL API&lt;/h1&gt;


&lt;div data-shared=&#34;stability/experimental_feature.md&#34;&gt;
            &lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;: This is an &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;experimental&lt;/a&gt; feature.
Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental feature, you must set the &lt;code&gt;stability.level&lt;/code&gt; 
    &lt;a href=&#34;/docs/alloy/v1.17/reference/cli/run/&#34;&gt;flag&lt;/a&gt; to &lt;code&gt;experimental&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/div&gt;

        
&lt;p&gt;Grafana Alloy exposes a GraphQL API for querying information about a running instance and its components.
You can use the GraphQL API to retrieve build metadata, readiness status, and component health.&lt;/p&gt;
&lt;p&gt;Before you begin, ensure you have the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A running Alloy instance.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;--server.http.enable-graphql&lt;/code&gt; flag set to &lt;code&gt;true&lt;/code&gt; when starting Alloy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;enable-the-graphql-api&#34;&gt;Enable the GraphQL API&lt;/h2&gt;
&lt;p&gt;The GraphQL API is disabled by default. To enable it, start Alloy with the &lt;code&gt;--server.http.enable-graphql&lt;/code&gt; flag:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-sh&#34;&gt;alloy run --server.http.enable-graphql config.alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;After you enable the API, the &lt;code&gt;/graphql&lt;/code&gt; endpoint becomes available on the Alloy HTTP server.
By default, this is &lt;code&gt;http://localhost:12345/graphql&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;graphql-playground&#34;&gt;GraphQL Playground&lt;/h2&gt;
&lt;p&gt;Alloy includes an optional interactive GraphQL Playground that you can use to explore the schema and run queries.
To enable the playground, use the &lt;code&gt;--server.http.enable-graphql-playground&lt;/code&gt; flag:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-sh&#34;&gt;alloy run --server.http.enable-graphql --server.http.enable-graphql-playground config.alloy&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;After you enable the playground, it&amp;rsquo;s available at &lt;code&gt;/graphql/playground&lt;/code&gt; on the Alloy HTTP server.
By default, this is &lt;code&gt;http://localhost:12345/graphql/playground&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;schema&#34;&gt;Schema&lt;/h2&gt;
&lt;p&gt;The GraphQL API exposes the following queries.&lt;/p&gt;
&lt;h3 id=&#34;alloy&#34;&gt;&lt;code&gt;alloy&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Information about the running Alloy instance.&lt;/p&gt;
&lt;h4 id=&#34;arguments&#34;&gt;Arguments&lt;/h4&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h4 id=&#34;fields&#34;&gt;Fields&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;branch&lt;/code&gt;:&lt;/strong&gt; The Git branch from which this build was created.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;buildDate&lt;/code&gt;:&lt;/strong&gt; The timestamp of when this build was created.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;buildUser&lt;/code&gt;:&lt;/strong&gt; The user account that initiated this build.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;isReady&lt;/code&gt;:&lt;/strong&gt; Whether the Alloy instance is up and running.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;revision&lt;/code&gt;:&lt;/strong&gt; The Git commit hash from which this build was created.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;version&lt;/code&gt;:&lt;/strong&gt; The semantic version of this Alloy build.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;components&#34;&gt;&lt;code&gt;components&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;All components running in Alloy.&lt;/p&gt;
&lt;h4 id=&#34;arguments-1&#34;&gt;Arguments&lt;/h4&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h4 id=&#34;fields-1&#34;&gt;Fields&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;health&lt;/code&gt;:&lt;/strong&gt; Health status of the component.
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;message&lt;/code&gt;:&lt;/strong&gt; Message of the health status.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;lastUpdated&lt;/code&gt;:&lt;/strong&gt; Last updated time of the health status.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;id&lt;/code&gt;:&lt;/strong&gt; Fully qualified ID of the component.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;name&lt;/code&gt;:&lt;/strong&gt; Name of the component.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;arguments&lt;/code&gt;:&lt;/strong&gt; Arguments of the component.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;exports&lt;/code&gt;:&lt;/strong&gt; Exports of the component.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;debugInfo&lt;/code&gt;:&lt;/strong&gt; Debug info of the component.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;component&#34;&gt;&lt;code&gt;component&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Component by ID.&lt;/p&gt;
&lt;h4 id=&#34;arguments-2&#34;&gt;Arguments&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;id&lt;/code&gt;&lt;/em&gt; (&lt;code&gt;ID!&lt;/code&gt;): The id of the component to retrieve.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;fields-2&#34;&gt;Fields&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;health&lt;/code&gt;:&lt;/strong&gt; Health status of the component.
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;message&lt;/code&gt;:&lt;/strong&gt; Message of the health status.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;lastUpdated&lt;/code&gt;:&lt;/strong&gt; Last updated time of the health status.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;id&lt;/code&gt;:&lt;/strong&gt; Fully qualified ID of the component.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;name&lt;/code&gt;:&lt;/strong&gt; Name of the component.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;arguments&lt;/code&gt;:&lt;/strong&gt; Arguments of the component.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;exports&lt;/code&gt;:&lt;/strong&gt; Exports of the component.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;debugInfo&lt;/code&gt;:&lt;/strong&gt; Debug info of the component.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The query returns &lt;code&gt;null&lt;/code&gt; if no component matches the given arguments.&lt;/p&gt;
&lt;h2 id=&#34;example-queries&#34;&gt;Example queries&lt;/h2&gt;
&lt;p&gt;To query the API using &lt;code&gt;curl&lt;/code&gt;, send a &lt;code&gt;POST&lt;/code&gt; request to the &lt;code&gt;/graphql&lt;/code&gt; endpoint with a JSON body containing the &lt;code&gt;query&lt;/code&gt; field:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;sh&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-sh&#34;&gt;curl -X POST http://localhost:12345/graphql \
  -H &amp;#34;Content-Type: application/json&amp;#34; \
  -d &amp;#39;{&amp;#34;query&amp;#34;: &amp;#34;{ alloy { version isReady } }&amp;#34;}&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The response is a JSON object:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JSON&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-json&#34;&gt;{
  &amp;#34;data&amp;#34;: {
    &amp;#34;alloy&amp;#34;: {
      &amp;#34;version&amp;#34;: &amp;#34;v1.14.0&amp;#34;,
      &amp;#34;isReady&amp;#34;: true
    }
  }
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;api-details&#34;&gt;API details&lt;/h2&gt;
&lt;p&gt;The GraphQL API has the following behavior:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Supported transports:&lt;/strong&gt; &lt;code&gt;OPTIONS&lt;/code&gt;, &lt;code&gt;GET&lt;/code&gt;, and &lt;code&gt;POST&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Introspection:&lt;/strong&gt; Enabled. You can query the schema using standard GraphQL introspection queries.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Timeout:&lt;/strong&gt; Each operation has a 10-second timeout.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Query caching:&lt;/strong&gt; Parsed queries are cached for performance.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="graphql-api">GraphQL API&lt;/h1>
&lt;div data-shared="stability/experimental_feature.md">
&lt;blockquote>
&lt;p>&lt;strong>EXPERIMENTAL&lt;/strong>: This is an &lt;a href="/docs/release-life-cycle/">experimental&lt;/a> feature.
Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.
To enable and use an experimental feature, you must set the &lt;code>stability.level&lt;/code>
&lt;a href="/docs/alloy/v1.17/reference/cli/run/">flag&lt;/a> to &lt;code>experimental&lt;/code>.&lt;/p></description></item></channel></rss>