39.4 GET_LAST_SYNC_TIMESTAMP Function

This function returns the timestamp of the last successful sync operation.

Syntax

APEX_REST_SOURCE_SYNC.GET_LAST_SYNC_TIMESTAMP (
    p_module_static_id  IN VARCHAR2,
    p_application_id    IN NUMBER   DEFAULT {current application id} )
    RETURN timestamp with local time zone;

Parameters

Table 39-4 GET_LAST_SYNC_TIMESTAMP Parameters

Parameter Description
p_module_static_id Static ID to identify the REST Data Source.
p_application_id ID of the application containing the REST Data Source.

Returns

This function returns the timestamp of the last successful sync operation.

Example

The following example returns the last synchronization timestamp of the "rest_movie" REST Data Source.

DECLARE
    l_last_sync_time timestamp with local time zone;
BEGIN
    apex_session.create_session(
        p_app_id          => 100,
        p_app_page_id     => 1,
        p_username        => '...' );

    l_last_sync_time := apex_rest_source_sync.get_last_sync_timestamp(
                            p_module_static_id      => 'rest_movie' );
END;