All Products
Search
Document Center

API Gateway:CreateApiGroup

Last Updated:Dec 24, 2025

Creates an API group.

Operation description

You must create an API group before you create an API. An API group is a basic property of an API.

  • This feature is intended for API providers.

  • Each user can create a maximum of 100 API groups in each region.

  • The system automatically assigns a second-level domain name to the group for API testing.

  • API groups are region-specific. To reduce network latency, select a group in the same region as your backend service.

  • After you create an API group, you can attach a custom domain name that has an ICP filing.

  • The queries per second (QPS) limit for this API operation is 50 calls per user.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

apigateway:CreateApiGroup

create

*ApiGroup

acs:apigateway:{#regionId}:{#accountId}:apigroup/*

None None

Request parameters

Parameter

Type

Required

Description

Example

GroupName

string

Yes

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

Weather

BasePath

string

No

The root path of the API.

/qqq

Description

string

No

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

The weather informations.

InstanceId

string

No

The ID of the instance.

apigateway-cn-v6419k43xxxxx

Tag

array<object>

No

The tags to add to the API group. You can add multiple tags.

Key, Value

object

No

Key

string

No

The key of the tag.

key

Value

string

No

The value of the tag.

value

Response elements

Element

Type

Description

Example

object

TagStatus

boolean

Indicates whether the tag exists. Valid values:true: The tag exists.false: The tag does not exist.

True

BasePath

string

The root path of the API.

/qqq

RequestId

string

The unique ID of the request.

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

Description

string

The description of the API group.

The weather informations

GroupName

string

The name of the API group.

Weather

GroupId

string

The ID of the API group. The ID is generated by the system and is globally unique.

523e8dc7bbe04613b5b1d726c2a7xx

InstanceId

string

The ID of the instance.

apigateway-cn-v6419k43xxxxx

SubDomain

string

The second-level domain name that is assigned to the group by the system. This domain name is used to test API calls.

523e8dc7bbe04613b5b1d726xxxxxxxx-cn-hangzhou.alicloudapi.com

InstanceType

string

The instance type.

  • CLASSIC_SHARED: a shared instance in the classic network

  • VPC_SHARED: a shared instance in a VPC

  • VPC_DEDICATED: a dedicated instance in a VPC

VPC_SHARED

Examples

Success response

JSON format

{
  "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

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.