All Products
Search
Document Center

Listed Cloud Market

Last Updated: Jun 05, 2019

An API is considered defined after front-end and back-end configurations are completed. Next, you need to debug, test, and publish the API. After the API is published, you can make it available on Alibaba Cloud Marketplace.

Step 1: Debug

In the API Gateway console, click APIs in the left-side navigation pane. On the API List page, click Manage in the Operation column corresponding to an API. Then, click Debug API in the left-side navigation pane. On the page that appears, set the request parameters to perform simple debugging operations. By default, the system calls the API in the test environment during debugging. Therefore, you must publish the API to the test environment. The following figure shows the page structure.This step can be skipped.

  1. Mock and non-Mock debugging methods are supported.
  2. If you select Mock, you must set the mock result. When you debug an API in Mock mode, the system does not directly call the back-end service. Instead, it verifies the API parameters and path addressing before accessing the back end.
  3. If you do not select Mock, the system directly calls the back-end service and then returns the result on the right. The result can be returned either by API Gateway or your back-end service.

Step 2: Test

What distinguishes testing from debugging is that testing simulates real API user scenarios to call APIs in the test environment. APIs in the test environment can be accessed through second-level domain names of API groups to which the APIs belong. In this case, you can perform the testing without binding independent domain names to the groups.

To simulate a real API call, you must publish the API to the test environment, create an application, and create an authorization for the application to call the API.

After the API is published to the test environment, its status becomes Running on the API List page.

debug

Create an application.

create app

View the application ID, which is used to search for the application.

app test

Authorize this application to call the API. Note that authorizations are environment-specific.

auth

Notes:

  1. You can use the Key and Secret of the created application to simulate third-party API calls. You can find the Key and Secret on the application details page in the console. For more information, see Quick Start for API Calling.
  2. The application is the identity used by the API user to call the API. Each API user must create an application. For more information, see Quick Start for API Calling.
  3. Authorization grants an application the permission to call an API. API authorization can be completed by the API service provider or by purchasing the API from Alibaba Cloud Marketplace. For more information, see Quick Start for API Calling.

Step 3: Make the API available on Alibaba Cloud Marketplace

  1. You must prepare an independent domain name. This domain name cannot be the same as your back-end service address. However, it can be the second, third, or higher level domain name of an existing domain name.
  2. This domain name must be resolved to the second-level domain name of the API group. If you want to make a group of APIs available on Alibaba Cloud Marketplace, you must resolve the CNAME of the independent domain name to the second-level domain name of the API group.
  3. This domain name must already be ICP filed at Alibaba Cloud. If the original filing was completed by another service provider, the domain name must be transferred for ICP filing at Alibaba Cloud.
  4. In the API Gateway console, bind the prepared domain name to the API group.
  5. After you publish the API to the release environment, you can prepare the API for release on Alibaba Cloud Marketplace. See the Guide to making APIs available on Alibaba Cloud Marketplace.

Step 4: Troubleshoot based on the checklist

  1. If debugging or testing fails, check whether the service address and Path configurations are correct.
  2. If the response is not as expected, ensure that API Gateway correctly maps the back end to the front end.
  3. If the API calling fails, check whether the bound independent domain name is ICP filed or transferred for ICP filing at Alibaba Cloud.
  4. If the API calling fails, check whether the CNAME of the bound independent domain name is resolved to the correct second-level domain name.
  5. If the Invalid Url error is reported during API debugging or testing, check whether the API is published to the test environment and is in the Running state.
  6. If the Invalid Url error is reported when you make the API available on Alibaba Cloud Marketplace, check whether the API is published to the release environment and is in the Running state.
  7. If the API calling does not take effect when the API definition is changed, check whether you have re-published the API.
  8. For APIs available on Alibaba Cloud Marketplace, you cannot select No Certification or Private.