invoke(url [, opts])
Invokes a REST API using the fetch function of a service broker.
Returns
A Promise for the pre-processed response.
Parameters
Name | Type | Description | Required |
url | string | The URL for the
request. Example:
| ✅ |
opts | object | The HTTP methods that are used in the request body to fetch the REST API. | ✅ |
Usage example
In this example, the API invokes the URL with the options provided, and returns a response.
invokePromise = getPConnect().getActionsApi().invoke(url, options);
invokePromise.then(() => {
// invoke success handling
}).catch(() => {
// invoke failure handling
});
Previous topic ignoreDuplicateCase(containerItemID) Next topic loadView(caseId, viewName, config)