API Stability Preview

The searchDomainAssets() GraphQL query fetches the list of assets in the given search domains.

Syntax

Below is the syntax for the searchDomainAssets() query field:

graphql
searchDomainAssets(
      searchDomainNames: [string]!, 
      assetTypes: [AssetPermissionsAssetType], 
      searchFilter: string, 
      limit: integer, 
      skip: integer, 
      orderBy: OrderBy
   ): SearchDomainAssetsResultSet

searchDomainNames is a list of names of the search domains to search. If empty, assets from all search domains for which the requester has access will be searched. For assetTypes (see Given Datatypes below), if empty, all asset types are included in search. The searchFilter is used to filter.

Below is an example of this query field with a few values requested:

Raw
graphql
query {
	searchDomainAssets(
    searchDomainNames: [ "humio" ]
    assetTypes: [],
    skip: 2,
    limit: 2
    orderBy: DESC  
  )
  { totalResults, results { name, assetType, id }  }
}
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 {
	searchDomainAssets(
    searchDomainNames: [ \"humio\" ]
    assetTypes: [],
    skip: 2,
    limit: 2
    orderBy: DESC  
  )
  { totalResults, results { name, assetType, id }  }
}"
}
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 {
	searchDomainAssets(
    searchDomainNames: [ \"humio\" ]
    assetTypes: [],
    skip: 2,
    limit: 2
    orderBy: DESC  
  )
  { totalResults, results { name, assetType, id }  }
}"
}
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 { ^
	searchDomainAssets( ^
    searchDomainNames: [ \"humio\" ] ^
    assetTypes: [], ^
    skip: 2, ^
    limit: 2 ^
    orderBy: DESC   ^
  ) ^
  { totalResults, results { name, assetType, id }  } ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "query {
	searchDomainAssets(
    searchDomainNames: [ \"humio\" ]
    assetTypes: [],
    skip: 2,
    limit: 2
    orderBy: DESC  
  )
  { totalResults, results { name, assetType, id }  }
}"
}'
    "$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 {
	searchDomainAssets(
    searchDomainNames: [ \"humio\" ]
    assetTypes: [],
    skip: 2,
    limit: 2
    orderBy: DESC  
  )
  { totalResults, results { name, assetType, id }  }
}";
$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 {
	searchDomainAssets(
    searchDomainNames: [ \"humio\" ]
    assetTypes: [],
    skip: 2,
    limit: 2
    orderBy: DESC  
  )
  { totalResults, results { name, assetType, id }  }
}"
}'''

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 {
	searchDomainAssets(
    searchDomainNames: [ \"humio\" ]
    assetTypes: [],
    skip: 2,
    limit: 2
    orderBy: DESC  
  )
  { totalResults, results { name, assetType, id }  }
}"
}
);


const options = {
  hostname: '$YOUR_LOGSCALE_URL/graphql',
  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": {
    "searchDomainAssets": {
      "totalResults": 37,
      "results": [
        {
          "name": "parseHumioText",
          "assetType": "SavedQuery",
          "id": "1S2bN2y5JwrzP6wEHHAQtL7bicF8mS0Y"
        },
        {
          "name": "my-webhook-action",
          "assetType": "Action",
          "id": "ZUFq14KhgRAZiakZgzBTFFaLqbnixCJz"
        }
      ]
    }
  }
}

Given Datatypes

AssetPermissionsAssetType is an enumerated list of choices.

Table: AssetPermissionsAssetType

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 30, 2025
Action   Short-TermSet to this option if the asset permission is related to an action.
AggregateAlert   Short-TermSet to this if asset permission is related to an aggregate alert.
Dashboard   Short-TermSet if asset permission is related to a dashboard.
File   Short-TermSet this option if related to a file.
FilterAlert   Short-TermUsed to indicate the asset permission is related to a filter alert.
LegacyAlert   Short-TermUsed if related to a legacy alert.
SavedQuery   Short-TermThe asset permission is related to a saved query.
ScheduledReport   Short-TermIndicates the asset permission is related to a scheduled report.
ScheduledSearch   Short-TermThe asset permission is related to a scheduled search.

Returned Datatypes

The returned datatype SearchDomainAssetsResultSet has a couple of parameters, and some sub-parameters. Below is a list of them:

Table: SearchDomainAssetsResultSet

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Aug 19, 2025
results[SearchDomainAsset]yes Short-TermThe paginated result set. See SearchDomainAsset.
totalResultsintegeryes Short-TermThe total number of matching results.