This documentation is for WSO2 API Manager 1.10.0 View documentation for the latest release.
Page Comparison - Working with Endpoints (v.7 vs v.8) - API Manager 1.10.0 - WSO2 Documentation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: https://wso2.org/jira/browse/DOCUMENTATION-7559

...

  • You can expose both REST and SOAP services to consumers through APIs.
  • You cannot call backend services secured with OAuth through APIs created in the API Publisher. At the moment, you can call only services secured with username/password.
  • The system reads gateway endpoints from the <APIM_HOME>/repository/conf/api-manager.xml file. When there are multiple gateway environments defined, it picks the gateway endpoint of the production environment. You can define both HTTP and HTTPS gateway endpoints as follows:

    Code Block
    languagexml
    <GatewayEndpoint>http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port}</GatewayEndpoint> 
  • If both types of endpoints are defined, the HTTPS endpoint will be picked as the server endpoint.

    Tip

    Tip: When you define secure (HTTPS) endpoints, set the <parameter name="HostnameVerifier"> element to AllowAll in the <APIM_HOME>/repository/conf/axis2/axis2.xml file's HTTPS transport sender configuration:

      <parameter name="HostnameVerifier">AllowAll</parameter>

    If not, the server throws an exception.

    Anchor
    advanced
    advanced


    Advanced Endpoint Configuration

    WSO2 API Manager provides controlling the production and sandbox endpoints with Advanced Endpoint Configuration.

    To configure your endpoints with this feature, go to the edit view of the API, navigate to the Implement tab and click the cogwheel icon next to the endpoint you want to configure.

    The Advanced Endpoint Configuration dialog box appears as below.


    Endpoint ConfigurationDescription
    Endpoint Suspend State

    If you want to configure the suspension of an Endpoint specifying error codes, maximum suspension time, suspension factors etc., you can use Endpoint Suspension State in Advanced Endpoint Configuration.

    Error Codes : Error codes in the drop down list which need to make the endpoint suspension. If the selected error codes are received from the endpoint, the endpoint will be suspended. Specify the transport error codes where the Endpoint Suspension should be triggered. You can select single or error codes here.

    Image Added

    Initial duration : The time duration for which the endpoint will be suspended, when one or more suspend error codes are received from it for the first time.

    Note

    When creating (or updating) Failover endpoints through the Publisher UI (in

    the

    the Implement

    tab

     tab), you need to go into

    the Advanced Options of

    this configuration box of each endpoint and specify a set of

    Transport

    Error Codes for the endpoint to fail over on and take off the Initial Duration by setting its value to -1.


    Image Removed

     

    Max duration : The maximum time duration for which the endpoint is suspended when suspend error codes are received from it.

    Factor: The duration to suspend can vary from the first time suspension to the subsequent time. The factor value decides the suspense duration variance between subsequent suspensions.

    Endpoint Timeout state

    Configurations of retry, error codes and delays in terms of Endpoint timeout can be configured with Endpoint Timeout State in Advanced Endpoint Configuration.

    Error Codes : A list of error codes. If these error codes are received from the endpoint, the request will be subjected to a timeout.

    Retries Before Suspension : The number of re-tries in case of a timeout, caused by the above listed error codes.

    Retry Delay : The delay between retries in milliseconds.

    Connection Timeout

    Duration and the Response Actions after a Connection Timeout can be configured here in Advanced Endpoint Configuration.

    Action : Response Action to be performed after connection timeout. You can select from Never Timeout, Discard Message, Execute Fault Sequence. The default value is Execute Fault Sequence.

    Duration : The time duration of Connection Timeout in milliseconds.

    Note

    if you want to change the Endpoint Connection Timeout duration globally affecting all APIs, do the following.

    1. Open <APIM_HOME>/repository/conf/synapse.properties. Change the value of the timeout as given below.

      Code Block
      synapse.global_timeout_interval=30000
    2. Open <ESB_HOME>/repository/conf/passthru-http.properties and change the socket timeout value.

      Code Block
      http.socket.timeout=30000

    Note that the global timeout value should be greater than the connection timeout value given for your API



  • When creating (or updating) Failover endpoints through the Publisher UI (in the Implement tab), you need to go into the Advanced Options of each endpoint and specify the values for the Endpoint Suspension State by setting transport error codes for the endpoint to fail over on and take off the Initial Duration by setting its value to -1.

Image Added

For more information about endpoints and how to add, edit or delete them, see the WSO2 ESB documentation.