Connector Builder provides an option to set the resource type in the resource configurations. The resource type is used to indicate when the resource should be triggered. Most standard resources are set to the resource type API. These API resources are trigged when an explicit request is made to the endpoint through SAP Open Connectors. Some other commonly used resource types are ON PROVISION, PROVISION AUTH VALIDATION, and ON REFRESH.
On Provision
The ON PROVISION resource type is called when a connector instance is being authenticated. It can be used to extract information during the authentication process that can then be added to the connector configuration. This type of resource does not get called when refreshing the instance authentication token. Additionally, it can be chained to occur after a PROVISION AUTH VALIDATION resource.
Provision Auth Validation
The PROVISION AUTH VALIDATION resource is called when a connector instance is being authenticated as well as when the authentication is being refreshed. For example, if you have an "expires_in" configuration in your connector, set to 3600, it will call the PROVISION AUTH VALIDATION resource every hour. Alternatively, for connectors that use OAuth but we still need to validate whether the access token works, we will use this resource for basic validation to see if we can make API calls. Finally, for connectors that support basic or custom authentication, we use PROVISION AUTH VALIDATION as the mechanism to retrieve the "access_token" or equivalent. If you need to make an additional call following that, then you can chain this call with an ON PROVISION call.
On Refresh
The ON REFRESH resource type is called after the connector makes an OAuth 2.0 token refresh request. This type can be used in place of PROVISION AUTH VALIDATION if you are using a connector that supports OAuth 2.0 and do not want to use the same PROVISION AUTH VALIDATION call to handle token validation and refresh.
API Connector Request
The API connector requests can be created in the extended connectors only. API connector request can add resource calls as per the provider requirement. The resource calls made in the request field from the vendor site are editable to match how it appears in the provider platform.