This section provides information you must understand for the API group and domain name before you enable API services.
An API group is the management unit of APIs. You must create a group before creating an API. The group consists of four attributes: name, description, region, and domain name. Note that:
The group region is fixed once selected.
Each account can have up to 50 API groups and each API group can have up to 200 APIs.
- When you create a group, the system assigns the group a second-level domain name to test your API. To enable the API service, you must bind the group to an independent domain name filed on Alibaba Cloud and resolve the CNAME of the independent domain name to the second-level domain name of the group. Up to five independent domain names can be bound to a group.
API Gateway locates the unique API group through the domain name, and the unique API through the Path+HTTPMethod. Before enabling API services, you must know the second-level domain name and independent domain name as follows:
- The unique and fixed second-level domain name is assigned by the system during group creation. By default, a second-level domain name is used to call the API only in the test environment under a small amount of traffic.
An independent domain name is used for enabling API services. You can bind up to five independent domain names to a group. When configuring independent domain names, pay attention to the following points:
Resolve the CNAME of an independent domain name to the API second-level domain name of the group before binding the API group and domain name.
Verify the domain name within one day. Otherwise, the unprocessed binding request is automatically withdrawn by the system.
If a domain name is already bound to another group, resolve the domain name to the second-level domain name of the to-be-bound group before binding. Otherwise, the binding fails.
If your API supports the HTTPS protocol, you must upload the SSL certificate of the domain name by entering the parameters on the Group Details page, including the name, content, and private key.
To test or enable the API, authorization is indispensable. Authorization means granting an app the permission to call an API. Note that:
- You can authorize the created app and access the second-level domain name to call the API.
- You can authorize the apps of customers to access the independent domain name to call your API service.
- Only an authorized app can call the API.
Now you have successfully enabled your API service. From creating the API to enabling it, you can create, modify, delete, view, test, release, remove, authorize, and revoke the authorization of an API. You can also view the release history and switch the version.