Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Log in to the API Publisher (http://localhost:9763/publisher) as a user who is assigned the creator role.  
    Image Added
  2. Click Add to open the Add New API window.
    Image Removed

    T
    he tables below explain the fields of the above window. The fields marked with * are mandatory.  

    General details

    For details, see API Visibility. 
    FieldDescription
    Name*Name of API as you want it to appear in the API store (E.g., PhoneVerification)
    Context*URI context path that is used by to API consumers. (E.g., /phoneverify)
    Version*API version in the form of version.major.minor. (E.g., 1.0.0)
    Visibility*
    Anchor
    APIVisibility
    APIVisibility
    For details, see API Visibility.
    TagsAny number of tags separated by comma. Tags allow you to group/categorize APIs that have similar attributes and behaviors. When tagging, always use relevant keywords and common search terms. Once a tagged API gets published to the API Store, its tags appear on the dashboard as links to the API consumers, who can click on them to quickly jump to a category they are interested in.
      

    Anchor
    DefVer
    DefVer

    Default version

    All API contexts are suffixed with an API version. The default version option allows you to mark one API, from a group of API versions, as the default one, so that it can be invoked without specifying the version number in the URL. For example, say that the following API versions exist:

    If you mark the third API as the default API, requests made to http://host:port/youtube/ get automatically routed to http://host:port/youtube/3.0.

    You can make any of the API versions as the default version at any time. However, if you mark an unpublished API as the default while the previously default API was a published one, then the users who invoke the default API will still be routed to the previous default version rather than the new one. This is because the new default API version is not published yet.

    Anchor
    tier
    tier
    Tier Availability*
    For details, see Throttling Tiers

    Transports*

    The transport protocol on which the API is exposed. Both HTTP and HTTPS transports are selected by default. If you want to limit API availability to only one transport (e.g., HTTPS), un-check the other transport.

    Response Caching
    Anchor
    cache
    cache
    Used to enable caching of response messages per each API. Caching protects the backend systems from being exhausted due to serving the same response (for same request) multiple times. If you select the enable option, specify the cache timeout value (in seconds) within which the system tries to retrieve responses from the cache without going to the backend.

    To configure response caching,
    edit <APIM_HOME>/repository/resources/api_templates/velocity_template.xml file. The cache mediator properties in the XML file are as follows:
      • collector  
        • true - Specifies that the mediator instance is a response collection instance.
        • false - Specifies that it's a cache serving instance.  
       
      • max MessageSize - Specifies the maximum size of a message to be cached in bytes. An optional attribute, with the default value as unlimited.  
      • maxSize - Defines the maximum number of elements to be cached.
    Visibility*
    Anchor
    APIVisibilityAPIVisibility 
    Thumbnail Image

    Icon to be displayed in API store (can be jpeg, tiff, png format)

    DescriptionHigh-level description of API functionality.
    TagsAny number of tags separated by comma. Tags allow you to group/categorize APIs that have similar attributes and behaviors. When tagging, always use relevant keywords and common search terms. Once a tagged API gets published to the API Store, its tags appear on the dashboard as links to the API consumers, who can click on them to quickly jump to a category they are interested in.  
    SequencesCustom sequences that you want to invoke in the message flow. For details, see per-API sequences.

    API resources

    FieldDescription
    Anchor
    resource
    resource
    API Resources
    For details, see API Resources.
  3. Click Implement and provide implementation details as follows:

    Endpoints

    FieldDescription
    Endpoint Type*

    An endpoint defines the external destination for an outgoing message. WSO2 API Manager has support for a range of different endpoint types allowing the API Gateway to connect with advanced types of backends. The API Manager supports HTTP endpoints, URL endpoints (also termed as address endpoint), WSDL endpoints, Failover endpoints, Load-balanced endpoints.

    Also see Adding an Endpoint section in the ESB docs for details of the advanced configuration options.

    Production/Sandbox URLs*Endpoint of the back-end service URL and endpoint of sandbox (testing) back-end service. A sandbox URL is used for online testing of an API with easy access to an API key.

    Also see Maintaining Separate Production and Sandbox Gateways.

    Info

    The system reads gateway endpoints from 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:

    <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.

    Info

    You cannot call back-end services secured with OAuth through APIs created in the API Manager. At the moment, you can call only services secured with username/password.

    Excerpt
    hiddentrue

    Added in FAQ space: http://docs.wso2.org/display/FAQ/APIM+Common#APIMCommon-Isitpossibletocallback-endservicessecuredwithOAuththroughAPIscreatedinAPIManager

    Info

    The API Manager allows you to expose both REST and SOAP services to consumers through APIs.

    Endpoint Security Scheme*

    Secured endpoint or Non secured endpoint. Default is non secured endpoint.

    If secured endpoint is selected, user is asked for credentials of the backend service.

    Note

    If you get a Hostname verfiication failed exception when trying to send requests to a secured endpoint, set <parameter name="HostnameVerifier"> to AllowAll in <APIM_HOME>/repository/conf/axis2/axis2.xml file's HTTPS transport sender configuration. For example, <parameter name="HostnameVerifier">AllowAll</parameter>.

    This parameter verifies the hostname of the certificate of a server when API Manager acts as a client and does outbound service calls.

    WSDL

    URL of WSDL file describing API interface. (E.g., http://ws.cdyne.com/phoneverify/phoneverify.asmx?wsdl )

    Info

    When you provide the WSDL URL, the WSDL content will be saved as a resource file under /system/governance/apimgt/applicationdata/ wsdls folder in the registry. API artifacts have a dependency to this WSDL resource. Its original service address location is reset to the API Gateway's address URL to prevent accessing the service endpoint directly. At the store, we will show the registry permlink of the wsdl resource. User can download the WSDL and create a service project out of that.

    WADLURL to WADL file (describing API interface).
    Destination-based Usage Tracking
    Anchor
    destination
    destination

    Enable this feature to generate a graph showing the number of times an API accesses its destination addresses. This graph is generated in the API Manager Statistics dashboard. It gives API Publishers an insight about the requests that leave the Gateway to destination endpoints, especially useful in cases where the same API can reach different endpoints (e.g., Load-balanced endpoints).

     

    Business information

    FieldDescription

    Business Owner and Email

    Information about the person responsible for this API at a business level.

    Technical Owner and Email

    Information about the person responsible for this API at a technical level.

    Subscriptions

    API ResourcesFor details, see
    • Available to current Tenant Only - Only users who are in the current tenant domain, i.e., the tenant domain of the API creator, can subscribe to this API.     
    • Available to All the Tenants - Users of all tenant domains in the API Manager deployment can subscribe to this API.   
    • Available to Specific Tenants - Users of specified tenant domains as well as the current tenant domain (i.e., the tenant domain of the API creator) can subscribe to this API.
    FieldDescription
    Subscriptions

    Used to specify the tenants who can subscribe to an API, in a multi-tenanted API Manager deployment. The following types of subscription categories are available between tenants:

    FieldDescription
    Anchor
    resourceresource

    API resources

    • API
    Resources
    • .
  4. Once the required information is filled, click the Create button at the end of the page to create the API.

  5. If the API is created successfully, the All APIs window opens with the newly-added API.

  6. Click on the API's name to open its information in the following tabs: 

    • Overview: Displays the details of the API
    • Edit: Allows the user to change the API details and test the Endpoint URL, Sandbox URL, WSDL and WADL.

      Info

      The Edit tab is only visible to users with creator privileges. Users logged in as creators do not have permission to publish the API. To publish, you need to log in as a user with publisher privileges.

    • Versions: Shows usage and subscription statistics of the API per version.
    • Docs: Allows to add   documents to an API. For instructions, refer to section Adding Documentation Using API Publisher.  
    • Users: Shows the list of active users subscribed to the API and their subscription statistics.  

...