Summary

The entitiesPage() GraphQL is used to get the next and previous page when querying assets across LogScale views and repositories. It requires the cursor from the entitiesSearch() or the entitiesPage() response, as well as the direction.

API Stability Short-Term

Syntax

graphql
entitiesPage(
     input: EntitiesPageInputType!
   ) SearchResult!

For the input, you'd enter the cursor. You'll have to first use the entitiesSearch() query to get the cursor value. Then you'd enter a page direction (i.e., Previous or Next). See the Input Parameters section for more on this.

For the results, you can get the total number of entities found, whether there is a previous or next page, and other related data for the page. See the Returned Values section for more.

Example

Raw
graphql
query {
  entitiesPage(
     input: {direction: Next,
     cursor: "eyJlbnRpdHlU..."
    }
  ) {totalResults, 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 {
  entitiesPage(
     input: {direction: Next,
     cursor: \"eyJlbnRpdHlU...\"
    }
  ) {totalResults, 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 {
  entitiesPage(
     input: {direction: Next,
     cursor: \"eyJlbnRpdHlU...\"
    }
  ) {totalResults, 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 { ^
  entitiesPage( ^
     input: {direction: Next, ^
     cursor: \"eyJlbnRpdHlU...\" ^
    } ^
  ) {totalResults, hasPreviousPage, hasNextPage} ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "query {
  entitiesPage(
     input: {direction: Next,
     cursor: \"eyJlbnRpdHlU...\"
    }
  ) {totalResults, 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 {
  entitiesPage(
     input: {direction: Next,
     cursor: \"eyJlbnRpdHlU...\"
    }
  ) {totalResults, 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 {
  entitiesPage(
     input: {direction: Next,
     cursor: \"eyJlbnRpdHlU...\"
    }
  ) {totalResults, 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 {
  entitiesPage(
     input: {direction: Next,
     cursor: \"eyJlbnRpdHlU...\"
    }
  ) {totalResults, 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": {
    "entitiesPage": {
      "totalResults": 15,
      "hasPreviousPage": true,
      "hasNextPage": true
    }
  },
  "extensions": {
    "preview": [
      {
        "name": "entitiesPage",
        "reason": "[PREVIEW: Under development]"
      }
    ]
  }
}

For the cursor, the actual text is very long. It's been truncated here to save space.

Input Parameters

For the input, you'll have to provide a direction (i.e., Previous or Next) and the cursor returned by entitiesSearch(). Don't confuse cursor with a visual prompt. In this situation, it's a programming object that enables traversal over records in a table.

Table: EntitiesPageInputType Input 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 30, 2024
cursorstringyes Short-TermThe cursor to use for entities pages.
directionEntitiesPageDirectionyes100Short-TermThe direction the cursor represents. See EntitiesPageDirection.

The datatype above uses another datatype for specifying the page direction. For your convenience, the table for that sub-datatype is included here:

Table: EntitiesPageDirection 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: Oct 3, 2025
Next   Short-TermUsed to indicate the entities page direction is towards the next page.
Previous   Short-TermIndicates the entities page direction is towards the previous.
RefreshCurrentFromFirstCursor   Short-TermThe entities page is refreshed from the first cursor.
RefreshCurrentFromLastCursor   Short-TermThe entities page is refreshed from the last cursor.

Returned Values

For the results, 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. Below is a list of choices along with a description of each:

Table: SearchResult 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 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.