Try WSO2 Cloud for Free
Sign in
||
Skip to end of metadata
Go to start of metadata

In WSO2 API Cloud, the default base URL for the API Store is https://api.cloud.wso2.com. Subscribers invoke the APIs published in this store through the API Gateway component. Therefore, the default base URL of the APIs is http(s)://gateway.api.cloud.wso2.com.

Instead of using the default URLs, you can use customized URLs that are more representative of your company or personal branding.

The following sections describe how to customize URLs

Select API Gateway Region

WSO2 API Cloud currently supports regional gateways in the regions Canada, US East, US West, Brazil (São Paulo), EU (Ireland), EU (Frankfurt), Singapore, Tokyo, Sydney, Seoul, Mumbai, Beijing. The default region is US East, and you can choose your region from the available options in this feature . Region selection requires you to use custom URL for your gateway. To use multiple regions contact WSO2 API Cloud Support via a support request or chat. 

Selecting a different region requires Getting Traction or higher subscription plan. If you have a trial account or a Starter plan, make sure that you upgrade you account.

Let's get started.

  1. Log in to the API Cloud as the tenant admin.
  2. In the API Publisher, click Configure and select Custom URL from the dropdown menu.
  3. Click Modify to change the existing Gateway domain.

  4. Click Modify to change the default gateway region. 

    The requests will be routed to the new regional gateway you have selected after you modify the gateway region.

  5. Select the preferred region from the drop down list and click Save.

    The following regions are supported by WSO2 API Cloud

    1. US East

    2. US West

    3. Singapore

    4. Sydney

    5. Canada

    6. Brazil

    7. EU (Ireland)

    8. EU (Frankfurt)

    9. Tokyo

    10. Seoul

    11. Mumbai

    12. Beijing

  6. You can see the new Domain Name updated in the UI.
     

You can create a custom domain name, SSL certificates and DNS records for the selected region. See, Create SSL certificates and DNS records for more details.

Make sure that your custom URL is set according to the changed gateway. See Customize API gateway URL for more details.

Create SSL certificates and DNS records

This tutorial explains how you can generate DNS records and SSL certificates to configure custom url for WSO2 API Cloud.

  1. Install an SSL key generation tool. In this tutorial, we use OpenSSL.

  2. Using the command-line, navigate to a location of your choice in the server and execute the following command to generate a private SSL key by the name private.key.

  3. Note that the key file is generated in your folder location.

  4. In the command-line, execute the following command to generate a certificate signing request file for your custom URL. Be sure to change the business address in this command to your own.

  5. Note that the certificate signing request file is generated in your folder location.

  6. Go to a certificate vendor of your choice and use the certificate signing request file to obtain a certificate for your domain. Any certificate that is accepted by browsers work. In this tutorial, for testing purposes, we use https://www.comodo.com/ as the certificate authority.
    You will typically receive an email with the certificate for your domain along with the certificate authority's root and intermediate certificates when you are done. Some certificate authorities provide the root and intermediate files as a single chain file, while others provide multiple file.

  7. If you received multiple root and intermediate files from your certificate authority, use the cat utility (available in Unix and Unix-based operating systems) to concatenate them to a single chain file (chain.crt). For example,

    Tip: If you are on Windows OS, do the following to concatenate the certificate files:

    • Open all certificate files except your domain certificate in a text editor like the notepad.

    • Create a new blank text file.

    • Copy the contents of all files in the reverse order and paste them into the new text file. For example, copy intermediate 3, intermediate 2, intermediate 1, and then the root certificate.

    • Save the newly created file (say chain.crt)
  8. Note that the chain.crt file should have content in the following order: 

  9. Reserve a domain name with any domain registrar and create DNS CNAME records that map the domain to your API Store and Gateway URLs.

    Tip: Most domain registrars provide step-by-step instructions in their Web sites. For your convenience, we have listed the general steps below.

    • Sign in to the domain registrar’s site.
    • Navigate to your Domain Name Server (DNS) management page. The location and name of this page vary by the host, but can generally be found under the 'Domain Management' or 'Advanced Settings' section.
    • Find the CNAME settings. Under the 'CNAME value or alias,' enter the subdomain that you'd like to map each URL to. The subdomain of developers.mytesturl.info is developers.
    • Set the CNAME destination to the API Cloud's custom DNS endpoint, which is customdns.api.cloud.wso2.com. When configuring custom url for API gateway, if you select a region different than the default region ( US East ) remember to set the CNAME destination according to the following table.
    RegionPointing URL
    US East

    customdns.api.cloud.wso2.com

    US West

    customdns-usw.api.cloud.wso2.com

    Singapore

    customdns-sg.api.cloud.wso2.com

    Sydney

    customdns-syd.api.cloud.wso2.com

    Canada

    customdns-can.api.cloud.wso2.com

    Brazil

    customdns-brz.api.cloud.wso2.com

    EU (Ireland)

    customdns-ire.api.cloud.wso2.com

    EU (Frankfurt)

    customdns-frk.api.cloud.wso2.com

    Tokyo

    customdns-tky.api.cloud.wso2.com

    Seoul

    customdns-seo.api.cloud.wso2.com

    Mumbai

    customdns-mum.api.cloud.wso2.com

    Beijing

    customdns-bjg.api.cloud.wso2.com

    You now have the SSL certificates and DNS records that you need to configure a custom URL for the API Cloud.

Customize API gateway URL

You can have a customized gateway URL that is more representative of your company or personal branding. Follow the steps below to customize your API Gateway URL.

  1. Log in to the API Cloud as the tenant admin.
  2. In the API Publisher, click Configure and select Custom URL from the dropdown menu.
  3. Click Modify to change the existing domain

    See Select API gateway region for details on how to change the default gateway region.

    You will not be able to change your default regional gateway (US East) if you have are not subscribed to Getting Traction or a higher plan. But you can configure a custom URL by adding a custom domain name with the CNAME pointing to customdns.api.cloud.wso2.com

  4. Enter the API Gateway custom URL. In this example, we use www.developers.mytesturl.info.

  5. Click Verify to check whether a CNAME record exists for this URL.

  6. If the CNAME verification is successful, you are prompted for the SSL certificates. Upload the files that you created in and click Proceed.

    The certificate files should satisfy the following requirements:

    FileRequirements
    SSL certificateThe certificate you got in step 6. It must satisfy the following requirements:
    • In X509 format

    • Not self signed

    • Not expired

    • Issued directly or by a wild card entry for a provided custom URL. For example,

    SSL Key FileThe private key of the certificate that you got in step 2 of Create SSL certificates and DNS records. It must be encrypted in the RSA format.
    Chain File The public key of the certificate that you got in step 7 of Create SSL certificates and DNS records. If the public key is included in the SSL file, extract it to a chain file.

    upload-files.png

     
  7. If the files are successfully uploaded, note that you get a message saying "Custom URL mapping is successfully added."

    Tip : Please wait about 10 minutes for the changes to take effect as adding the configurations and restarting the load balancers can take some time.

    If you have selected a region that requires additional configurations, you will see the following message followed by an email with instructions.

    Once the regional gateway is ready with the custom URL you have added, Cloud team will get back to you via email.

  8. Once the configurations above are successful, you can visit API Store, select an API and note the new API URLs in its Overview page.

    They should change according the new API Gateway URL.

 

Customize Store URL

The API Store URL is what subscribers will enter into a browser to get to your API Store. Follow the steps below to customize the URL of your API Store.

  1. Log in to the API Cloud as the tenant admin.
  2. In the API Publisher, click Configure and select Custom URL from the dropdown menu.
  3. Click Modify and enter the API Store custom URL. In this example, we use www.developers.mytesturl.info.
  4. Click Verify to check whether a CNAME record exists for this URL.

  5. If the CNAME verification is successful, you are prompted for the SSL certificates. Upload the files that you created in and click Proceed.

    The certificate files should satisfy the following requirements:

    FileRequirements
    SSL certificateThe certificate you got in step 6. It must satisfy the following requirements:
    • In X509 format

    • Not self signed

    • Not expired

    • Issued directly or by a wild card entry for a provided custom URL. For example,

    SSL Key FileThe private key of the certificate that you got in step 2 of Create SSL certificates and DNS records. It must be encrypted in the RSA format.
    Chain File The public key of the certificate that you got in step 7 of Create SSL certificates and DNS records. If the public key is included in the SSL file, extract it to a chain file.

    upload-files.png

  6. If the files are successfully uploaded, note that you get a message saying "Custom URL mapping is successfully added."

    Tip : Please wait about 10 minutes for the changes to take effect as adding the configurations and restarting the load balancers can take some time.

    You have successfully changed the API Store domain name to a custom value.

  7. Access the API Store using your new URL. In this example, the new API Store URL is https://www.developers.mytesturl.info.

 


  • No labels