Skip to main content
Version: 1.x

Function: queryEntities()

queryEntities<TData>(page, serviceUrl, entitySet, options?): Promise<ODataHttpResult<readonly TData[]>>

Defined in: src/modules/odata-http.ts:468

Queries an entity set via HTTP GET with OData system query options.

Type Parameters

TData

TData = unknown

Parameters

page

ODataHttpPage

Playwright Page with request API.

serviceUrl

string

OData service root URL.

entitySet

string

Name of the entity set to query.

options?

ODataQueryOptions

Query options including $filter, $select, $expand, $orderby, $top, $skip.

Returns

Promise<ODataHttpResult<readonly TData[]>>

Array of entities with HTTP status.

Intent

Read a collection of OData entities with optional filtering, sorting, and paging.

Example

const result = await queryEntities(page, '/sap/opu/odata/sap/SVC/', 'Products', {
filter: "Price gt 10",
select: "Name,Price",
top: 20,
});