All Products
Search
Document Center

API Gateway:CreateApiGroup

Last Updated:Feb 09, 2023

Creates an API group.

Operation Description

You can call this operation to create an API group. You must create an API group before you create an API. An API group is a basic attribute of an API.

  • This operation is intended for API providers.
  • Each user can create a maximum of 100 API groups in a region.
  • A second-level domain name is automatically allocated to the API group for testing purposes.
  • An API group has a region attribute. After you create an API and select a group for the API, the region is also selected. We recommend that you select the same region to which your backend services belong to reduce network latency.
  • After you create an API group, you can bind a custom domain name to the group.
  • The QPS limit on this operation is 50 per user.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All resources is used in the Resource type column of the operation.
  • Condition keyword: refers to the condition keyword defined by the cloud product itself.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operateaccess levelResource typeconditional keywordAssociation operation
apigateway:CreateApiGroupWrite
  • ApiGateway
    acs:apigateway:*:{#accountId}:*/*
    without
without

Request parameters

ParameterTypeRequiredDescriptionExample
GroupNamestringYes

The name of the API group. The name must be globally unique. The name must be 4 to 50 characters in length. It must start with a letter and can contain letters, digits, and underscores (_).

Weather
BasePathstringNo

The root path of the API.

/qqq
DescriptionstringNo

The description of the API group. The description can be up to 180 characters in length.

The weather informations.
InstanceIdstringNo

The ID of the instance.

apigateway-cn-v6419k43xxxxx
TagarrayNo

The tag of objects that match the lifecycle rule. You can specify multiple tags.

objectNo
KeystringNo

The key of the tag.

key
ValuestringNo

The value of the tag.

value

Response parameters

ParameterTypeDescriptionExample
object
TagStatusboolean

Indicates whether the tag exists. If the value is true, the tag exists. If the value is false, the tag does not exist.

True
BasePathstring

The root path of the API.

/qqq
RequestIdstring

The ID of the request.

FF3B7D81-66AE-47E0-BF69-157DCF187514
Descriptionstring

The description of the API group.

The weather informations
GroupNamestring

The name of the group to which an API belongs.

Weather
GroupIdstring

The ID of the API group to which the domain name to be deleted is bound. This ID is generated by the system and globally unique.

523e8dc7bbe04613b5b1d726c2a7xx
InstanceIdstring

The ID of the instance.

apigateway-cn-v6419k43xxxxx
SubDomainstring

The second-level domain name bound to the API group. This domain name is used to test API calls.

523e8dc7bbe04613b5b1d726xxxxxxxx-cn-hangzhou.alicloudapi.com
InstanceTypestring

The type of the instance.

  • CLASSIC_SHARED: shared instance that uses the classic network configuration
  • VPC_SHARED: shared instance that uses VPC
  • VPC_DEDICATED: dedicated instance that uses VPC
VPC_SHARED

Example

Normal return example

JSONFormat

{
  "TagStatus": true,
  "BasePath": "/qqq",
  "RequestId": "FF3B7D81-66AE-47E0-BF69-157DCF187514",
  "Description": "The weather informations",
  "GroupName": "Weather",
  "GroupId": "523e8dc7bbe04613b5b1d726c2a7xx",
  "InstanceId": "apigateway-cn-v6419k43xxxxx",
  "SubDomain": "523e8dc7bbe04613b5b1d726xxxxxxxx-cn-hangzhou.alicloudapi.com",
  "InstanceType": "VPC_SHARED"
}

Error codes

For a list of error codes, visit the API error center.

Change history

Change timeSummary of changesOperate
No change history