Summary

The featureFlags() GraphQL query is used to list feature flags depending on filters and context. All flags should be considered as beta features. Enabling features that are marked as experimental is strongly discouraged and can lead to LogScale being in a bad state beyond repair.

API Stability Preview

Syntax

graphql
featureFlags(
     includeExperimentalFeatures: boolean, 
     enabledInScopeFilter: EnabledInScope
   ): [FeatureFlagV2]!

The results of this query can be extensive. Use the enabledInScopeFilter parameter to return only what you want or need (e.g., UserScope for specifically user related features).

Some experimental features can cause problems. It might be useful to use the includeExperimentalFeatures parameter to see if any experimental features are enabled. Set it to true to include them in the results.

For the results, you'll need to specify the experimental parameter in the list of return parameters to know which is experimental (see Return Datatype section below).

Example

Raw
graphql
query {featureFlags(
     includeExperimentalFeatures: true,
     enabledInScopeFilter: Disabled
     )
  {flag, experimental, description}
}
Mac OS or Linux (curl)
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d @- << EOF
{"query" : "query {featureFlags(
     includeExperimentalFeatures: true,
     enabledInScopeFilter: Disabled
     )
  {flag, experimental, description}
}"
}
EOF
Mac OS or Linux (curl) One-line
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d @- << EOF
{"query" : "query {featureFlags(
     includeExperimentalFeatures: true,
     enabledInScopeFilter: Disabled
     )
  {flag, experimental, description}
}"
}
EOF
Windows Cmd and curl
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql ^
    -H "Authorization: Bearer $TOKEN" ^
    -H "Content-Type: application/json" ^
    -d @'{"query" : "query {featureFlags( ^
     includeExperimentalFeatures: true, ^
     enabledInScopeFilter: Disabled ^
     ) ^
  {flag, experimental, description} ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "query {featureFlags(
     includeExperimentalFeatures: true,
     enabledInScopeFilter: Disabled
     )
  {flag, experimental, description}
}"
}'
    "$YOUR_LOGSCALE_URL/graphql"
Perl
perl
#!/usr/bin/perl

use HTTP::Request;
use LWP;

my $TOKEN = "TOKEN";

my $uri = '$YOUR_LOGSCALE_URL/graphql';

my $query = "query {featureFlags(
     includeExperimentalFeatures: true,
     enabledInScopeFilter: Disabled
     )
  {flag, experimental, description}
}";
$query =~ s/\n/ /g;
my $json = sprintf('{"query" : "%s"}',$query);
my $req = HTTP::Request->new("POST", $uri );

$req->header("Authorization" => "Bearer $TOKEN");
$req->header("Content-Type" => "application/json");

$req->content( $json );

my $lwp = LWP::UserAgent->new;

my $result = $lwp->request( $req );

print $result->{"_content"},"\n";
Python
python
#! /usr/local/bin/python3

import requests

url = '$YOUR_LOGSCALE_URL/graphql'
mydata = r'''{"query" : "query {featureFlags(
     includeExperimentalFeatures: true,
     enabledInScopeFilter: Disabled
     )
  {flag, experimental, description}
}"
}'''

resp = requests.post(url,
                     data = mydata,
                     headers = {
   "Authorization" : "Bearer $TOKEN",
   "Content-Type" : "application/json"
}
)

print(resp.text)
Node.js
javascript
const https = require('https');

const data = JSON.stringify(
    {"query" : "query {featureFlags(
     includeExperimentalFeatures: true,
     enabledInScopeFilter: Disabled
     )
  {flag, experimental, description}
}"
}
);


const options = {
  hostname: '$YOUR_LOGSCALE_URL',
  path: 'graphql',
  port: 443,
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Content-Length': data.length,
    Authorization: 'BEARER ' + process.env.TOKEN,
    'User-Agent': 'Node',
  },
};

const req = https.request(options, (res) => {
  let data = '';
  console.log(`statusCode: ${res.statusCode}`);

  res.on('data', (d) => {
    data += d;
  });
  res.on('end', () => {
    console.log(JSON.parse(data).data);
  });
});

req.on('error', (error) => {
  console.error(error);
});

req.write(data);
req.end();
Example Responses
Success (HTTP Response Code 200 OK)
json
{
  "data": {
    "featureFlags": [
      {
        "flag": "AlternateQueryMergeTargetHandling",
        "experimental": true,
        "description": "Enables alternate query merge target handling"
      },
      {
        "flag": "ArrayFunctions",
        "experimental": true,
        "description": "Enable ArrayFunctions in query language."
      },
      {
        "flag": "CachePolicies",
        "experimental": true,
        "description": "Prioritize newer over older segments."
      },
      {
        "flag": "CustomIngestTokens",
        "experimental": false,
        "description": "Enable custom ingest tokens not generated by LogScale."
      },
      ...
  }
}

The results would normally be very lengthy. They've been shortened to save space on this page.

Input Parameters

Some experimental features can cause problems. It might be useful to not include any experimental features in the results. You can also limit results to only what you want or need (see second table below).

Table: Input Parameters & Datatypes

Parameter Type Required Default Description
This table contains all input parameters for this query. Since one of the parameters uses a special datatype, an additional table is included below with its parameters.
enabledInScopeFilter EnabledInScope     Which scope feature flags should be returned. See table below.
includeExperimentalFeatures boolean     Whether to include experimental features.

The results of this query can be extensive. The enumerated list is used to set the scope of which feature flags should be returned, such as global, organization, or user based.

Table: EnabledInScope Enum Datatype

ParameterTypeRequiredDefaultStabilityDescription
Some input parameters may be required, as indicated in the Required column. For return values, this indicates that you are assured a value if the field is requested for the results.
Table last updated: May 8, 2025
Disabled   PreviewUsed to disable the feature flag.
GlobalScope   PreviewIndicates the feature flag is enabled globally.
OrganizationScope   PreviewSets the feature flag scope for the organization.
UserScope   PreviewUsed to enable the feature flag for a user.

Returned Values

For the results, you can specify what you want returned: the features that are enabled, being the most obvious. But you can get a bit more information. They're described here:

Table: FeatureFlagV2 Datatype

ParameterTypeRequiredDefaultStabilityDescription
Some input parameters may be required, as indicated in the Required column. For return values, this indicates that you are assured a value if the field is requested for the results.
Table last updated: Sep 25, 2024
descriptionstringyes PreviewA description of the feature flag.
experimentalbooleanyes PreviewWhether the feature is experimental.
flagFeatureFlagyes PreviewThe feature flag. See FeatureFlag.