Creating an API Group¶
An API group contains APIs used for the same service. You can manage APIs by group, and must create a group before creating an API.
You can create an API group using the following methods:
Creating an API Group Directly
You can create APIs for the group as required.
Import an API file to create a group.
Importing a CCE Workload
By importing Cloud Container Engine (CCE) workloads, you can open up your CCE service capabilities. For details, see Importing a CCE Workload.
Note
To make your APIs available for users to access, bind independent domain names to the group to which the APIs belong.
Each API can belong to only one group.
The system automatically allocates a subdomain name to each API group for internal testing. The subdomain name can be accessed 1000 times a day. You can also disable the Debugging Domain Name switch. When disabled, the debugging domain name is hidden and APIs cannot be called through it.
API group DEFAULT is automatically generated for each gateway. APIs in this group can be called using the IP address of the Virtual Private Cloud (VPC) where the gateway is deployed.
Prerequisites¶
You have created a gateway.
Creating an API Group Directly¶
Go to the APIG console.
Select a dedicated gateway at the top of the navigation pane.
Choose API Management > API Groups.
Choose Create API group > Create Directly, and enter group information.
¶ Parameter
Description
Name
API group name.
Description
Description of the API group.
Click OK.
Importing an API Design File¶
Go to the APIG console.
Select a dedicated gateway at the top of the navigation pane.
Choose API Management > API Groups.
Choose Create API Group > Import API Design File.
Select an API file and click Open.
Set the import parameters.
¶ Parameter
Description
Import
Options:
New group: Import APIs to a new API group. If you select this option, the system automatically creates an API group and imports the APIs into this group.
Existing group: Import APIs to an existing API group. If you select this option, the system adds the APIs to the selected API group while retaining the existing APIs in the API group.
API group
Select an API group if you set Import to Existing group.
Basic Definition Overwrite
Determine whether to overwrite an existing API if the name of the API is the same as that of an imported API.
This parameter is available only if you set Import to Existing group.
Extended Definition Overwrite
If this option is selected, the extended definition items (access control and request throttling policies) of an imported API will overwrite the existing policies with the same name.
(Optional) To configure the APIs, click Configure Global Settings.
Click Import Now, and determine whether to publish the APIs.
Now: Publish the APIs in a specified environment now.
Later: Publish the APIs later.
Click OK. The APIs tab is displayed, showing the imported APIs.
Follow-Up Operations¶
After an API group is created, bind independent domain names to it so that API callers can use them to call open APIs in the group.