Skip to main content

fetchResourceByName

fetchResourceByName<T>(resourceName, resourceId, oDataConfig?): Promise<undefined | NonNullable<T>>

Gets resource by resource name and resource id from api.

Type Parameters​

T​

T = WithId

type of a resource

Parameters​

resourceName​

string

name of the resource

resourceId​

string

id of the resource

oDataConfig?​

ODataConfig

(optional) ODataConfig

Returns​

Promise<undefined | NonNullable<T>>

T or undefined if not found