entitiesSearch()

API Stability Short-Term

The entitiesSearch() is used to query assets across LogScale views and repositories. It will return only the first page. The response includes a cursor that can be used by the entitiesPage() query to get next or previous page with the same parameters.

There are a few related query fields: entitiesPage() for getting the next and previous pages when querying assets; entitiesLabels() for getting labels associated with assets; and entitiesPackages() for getting a list of packages associated with assets.

There's no precise equivalent for this query through the UI. The entities queries are primarily tools for developing custom applications using the GraphQL API.

Syntax

graphql
entitiesSearch(
     input: EntitySearchInputType!
   ) SearchResult!

For the input, you'd specify on what you want to search — the default is blank, which returns everything. You'd also specify the type of entity to search (e.g., Dashboard), and the number of entries per page. See the Given Datatype section below for more details. For the return parameters you can request the number of entities found and whether there is a previous or next page.

Example

Below is an example using this query field. It requests information on a specific type entity, on dashboards containing "sales" in their name. It says also to group the results into 5 dashboards per page. The results are shown afterwards.

Raw
graphql
query {
  entitiesSearch(
    input: {searchTerm: "sales", 
            entityTypes: [Dashboard], 
            pageSize: 5}
  ) { totalResults, cursor,
      hasPreviousPage, hasNextPage }
}
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 {
  entitiesSearch(
    input: {searchTerm: \"sales\", 
            entityTypes: [Dashboard], 
            pageSize: 5}
  ) { totalResults, cursor,
      hasPreviousPage, hasNextPage }
}"
}
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 {
  entitiesSearch(
    input: {searchTerm: \"sales\", 
            entityTypes: [Dashboard], 
            pageSize: 5}
  ) { totalResults, cursor,
      hasPreviousPage, hasNextPage }
}"
}
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 { ^
  entitiesSearch( ^
    input: {searchTerm: \"sales\",  ^
            entityTypes: [Dashboard],  ^
            pageSize: 5} ^
  ) { totalResults, cursor, ^
      hasPreviousPage, hasNextPage } ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "query {
  entitiesSearch(
    input: {searchTerm: \"sales\", 
            entityTypes: [Dashboard], 
            pageSize: 5}
  ) { totalResults, cursor,
      hasPreviousPage, hasNextPage }
}"
}'
    "$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 {
  entitiesSearch(
    input: {searchTerm: \"sales\", 
            entityTypes: [Dashboard], 
            pageSize: 5}
  ) { totalResults, cursor,
      hasPreviousPage, hasNextPage }
}";
$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 {
  entitiesSearch(
    input: {searchTerm: \"sales\", 
            entityTypes: [Dashboard], 
            pageSize: 5}
  ) { totalResults, cursor,
      hasPreviousPage, hasNextPage }
}"
}'''

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 {
  entitiesSearch(
    input: {searchTerm: \"sales\", 
            entityTypes: [Dashboard], 
            pageSize: 5}
  ) { totalResults, cursor,
      hasPreviousPage, hasNextPage }
}"
}
);


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": {
    "entitiesSearch": {
      "totalResults": 15,
      "cursor": "eyJlbnRpdHlU..."
      "hasPreviousPage": false,
      "hasNextPage": true
    }
  },
  "extensions": {
    "preview": [
      {
        "name": "entitiesSearch",
        "reason": "[PREVIEW: Under development]"
      }
    ]
  }
}

Notice that the example above requests a count of the total results , which are grouped per the input by five per page. It also asks whether there is a previous and next page. You would use these return values in variables in whatever application you might write and use. The value for the cursor is shortened here. It's normally very long. You'd capture that value and use it with entitiesPage().

Given Datatype

For the input, you might specify a search term or a specific field on which to search. You could also indicate how you want the results sorted and other parameters related to paginating them. Below is a list of parameters available:

Table: EntitySearchInputType

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 30, 2025
entityTypes[EntitySearchEntityType]yes Short-TermThe types of entity. See EntitySearchEntityType .
fieldFilters[FieldFilterInput]yes Short-TermThe fields on which to filter. See FieldFilterInput.
pageSizeinteger 100Short-TermThe number of records to return per page.
paths[string]yes Short-TermThe paths to search.
searchTermstring  Short-TermText on which to search assets in views and repositories.
sortBy[EntitySearchSortInfoType]yes Short-TermEnter name with a string for the field on which to sort. See EntitySearchSortInfoType.

Returned Datatype

For the returned datatype, you can request the total number of entities found, whether there is a previous or next page (i.e., are you at the beginning or end of the results), and other related data for the page. You might also want to get the cursor to use with entitiesPage(). Below is a list of parameters allowed, along with a description of each:

Table: SearchResult

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 30, 2025
cursorstring  Short-TermThe cursor useds for going to the next or previous page.
data[EntitySearchResultEntity]yes Short-TermThe results of the search. See EntitySearchResultEntity.
hasNextPagebooleanyes Short-TermWhether there is a next page. False indicates it's the last page.
hasPreviousPagebooleanyes Short-TermWhether there is a previous page. False indicates it's the first page.
totalResultsintegeryes Short-TermThe total number of results that matched the search query. Only pageSize elements will be returned.