Skip to main content
Version: 1.x

Function: deleteEntity()

deleteEntity(page, serviceUrl, entitySet, key, options?): Promise<void>

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

Deletes an entity via HTTP DELETE.

Parameters

page

ODataHttpPage

Playwright Page with request API.

serviceUrl

string

OData service root URL.

entitySet

string

Name of the entity set.

key

string

Entity key including parentheses, e.g. "('123')".

options?

ODataHttpOptions

HTTP options including required CSRF token.

Returns

Promise<void>

Intent

Remove an OData entity by sending a DELETE request to the service.

Throws

ODataError with ERR_ODATA_CSRF if CSRF token is missing.

Throws

ODataError with ERR_ODATA_REQUEST_FAILED on HTTP error.

Example

await deleteEntity(page, '/sap/opu/odata/sap/SVC/', 'Products', "('123')", {
csrfToken: token,
});