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.

After reviewing the list of features that are enabled, you may want to disable some of them. To do that, you'd use one of the related mutation fields: disableFeature() to disable a feature, globally. Use enableFeature() to enable a feature. There are no equivalents to this query or these mutations in the UI. You'll have to use the GraphQL API.

To enable and disable features for an organization, you can use the enableFeatureForOrg() and disableFeatureForOrg() mutations. Use enableFeatureForUser() and disableFeatureForUser() to enable and disable features for a specific user.

For more information on enabling and disabling features, see the Enabling and Disabling Feature Flags reference page.

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

Given Datatype

The enumerated datatype below is used to set the scope of which feature flags should be returned, such as global, organization, or user based. Below is a list of the choices:

Table: EnabledInScope

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For return datatypes, this indicates that you must specify which fields you want returned in 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 Datatype

The returned datatype is used to specify what you want returned from the query: the features that are enabled, being the most obvious. But you can get a bit more information. They're described here:

Table: FeatureFlagV2

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For return datatypes, this indicates that you must specify which fields you want returned in 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.