API Stability |
Preview
|
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.
Syntax
Below is the syntax for entitiesPage():
entitiesPage(
input: EntitiesPageInputType!
): SearchResult!
For the input, you'd enter input, followed by a colon and what you want to input between curly-brackets. The parameters for EntitiesPageInputType are limited to two: direction and cursor. The direction value is either Previous or Next. For the cursor, you'll have to get that value by first using entitiesSearch() .
Below is an example using this query field:
query {
entitiesPage(
input: {direction: Next,
cursor: "eyJlbnRpdHlU..."
}
) {totalResults, hasPreviousPage, hasNextPage}
}
{
"data": {
"entitiesPage": {
"totalResults": 15,
"hasPreviousPage": true,
"hasNextPage": true
}
},
"extensions": {
"preview": [
{
"name": "entitiesPage",
"reason": "[PREVIEW: Under development]"
}
]
}
}
Given Datatypes
For EntitiesPageInputType, there are two parameters that may be given. They're listed below:
Table: EntitiesPageInputType
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
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 18, 2024 | |||||
cursor | string | yes | Preview | The cursor to use for entities pages. | |
direction | EntitiesPageDirection | yes | 100 | Preview | The direction the cursor represents. See EntitiesPageDirection . |
Returned Datatypes
The returned datatype SearchResult
has a
few parameters. Below is a list of them along with a description
of each:
Table: SearchResult
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
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: Oct 3, 2024 | |||||
cursor | string | Preview | The cursor useds for going to the next or previous page. | ||
data | [EntitySearchResultEntity ] | yes | Preview | The results of the search. See ViewInteractionEntry , FileEntry , and DashboardEntry . | |
hasNextPage | boolean | yes | Preview | Whether there is a next page. False indicates it's the last page. | |
hasPreviousPage | boolean | yes | Preview | Whether there is a previous page. False indicates it's the first page. | |
totalResults | integer | yes | Preview | The total number of results that matched the search query. Only pageSize elements will be returned. |