Use this function to invoke a RESTful style Web service supplying either name value pairs, a character based payload or a binary payload and returning the response in a CLOB.
Syntax
APEX_WEB_SERVICE.MAKE_REST_REQUEST(
    p_url                  IN VARCHAR2,
    p_http_method          IN VARCHAR2,
    p_username             IN VARCHAR2 default null,
    p_password             IN VARCHAR2 default null,
    p_scheme               IN VARCHAR2 default 'Basic',
    p_proxy_override       IN VARCHAR2 default null,
    p_transfer_timeout     IN NUMBER   default 180,
    p_body                 IN CLOB default empty_clob(),
    p_body_blob            IN BLOB default empty_blob(),
    p_parm_name            IN apex_application_global.VC_ARR2 default empty_vc_arr,
    p_parm_value           IN apex_application_global.VC_ARR2 default empty_vc_arr,
    p_wallet_path          IN VARCHAR2 default null,
    p_wallet_pwd           IN VARCHAR2 default null,
    p_https_host           IN VARCHAR2 default null,
    p_credential_static_id IN VARCHAR2 default null,
    p_token_url            IN VARCHAR2 default null )  
RETURN CLOB;
Parameters
Table 36-5 MAKE_REST_REQUEST Function Parameters
| Parameter | Description | 
|---|---|
| 
 | The URL endpoint of the Web service. | 
| 
 | The HTTP method to use, PUT, POST, GET, HEAD, or DELETE. | 
| 
 | The username if basic authentication is required for this service. | 
| 
 | The password if basic authentication is required for this service | 
| 
 | The authentication scheme, Basic (default) or AWS or Digest or  | 
| 
 | The proxy to use for the request. The proxy supplied overrides the proxy defined in the application attributes. | 
| 
 | The amount of time in seconds to wait for a response. | 
| 
 | The HTTP payload to be sent as CLOB. | 
| 
 | The HTTP payload to be sent as binary BLOB. For example, posting a file. | 
| 
 | The name of the parameters to be used in name/value pairs. | 
| 
 | The value of the parameters to be used in name/value pairs. | 
| 
 | The file system path to a wallet if the URL endpoint is https. For example, file:/usr/home/oracle/WALLETS. The wallet path provided overrides the wallet defined in the instance settings. | 
| 
 | The password to access the wallet. | 
| 
 | The host name to be matched against the common name (CN) of the remote server's certificate for an HTTPS request. | 
| 
 | The name of a Web Credential (configured in Shared Components) to be used. | 
| 
 | For token-based authentication flows (like OAuth2): The URL where to get the token from. | 
Example
The following example calls a RESTful style Web service using the make_rest_request function passing the parameters to the service as name/value pairs. The response from the service is stored in a locally declared CLOB.
declare
    l_clob      CLOB;
BEGIN
 
    l_clob := apex_web_service.make_rest_request(
        p_url => 'http://us.music.yahooapis.com/ video/v1/list/published/popular',
        p_http_method => 'GET',
        p_parm_name => apex_util.string_to_table('appid:format'),
        p_parm_value => apex_util.string_to_table('xyz:xml'));
 
END;
Parent topic: APEX_WEB_SERVICE