All Products
Search
Document Center

API Gateway:CreateApiGroup

Last Updated:Mar 16, 2026

Create an API group.

Operation description

You must create an API group before you create APIs. The group is a required property of each API.

  • This feature is for API providers.

  • Each user can create up to 100 groups per region.

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

  • Groups are associated with a region. When you select a group for an API, you also select its region. To reduce network latency, choose a region that matches your backend service region.

  • After you create a group, attach a custom domain name with an ICP filing to it.

  • The QPS limit for this operation is 50 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 group name. It must be unique and can contain only letters, digits, underscores, and Chinese characters. It must start with a letter or Chinese character. Its length must be 4 to 50 characters.

Weather

BasePath

string

No

The root path for APIs in this group.

/qqq

Description

string

No

A description of the API group. It can be up to 180 characters long.

The weather informations.

InstanceId

string

No

The ID of the instance.

apigateway-cn-v6419k43xxxxx

Tag

array<object>

No

The object tags to which the rule applies. You can specify 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 for APIs in this group.

/qqq

RequestId

string

The unique identifier 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. This 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 assigned to the group by the system. Use it to test API calls.

523e8dc7bbe04613b5b1d726xxxxxxxx-cn-hangzhou.alicloudapi.com

InstanceType

string

The type of the instance.
- CLASSIC_SHARED: Shared instance in classic network
- VPC_SHARED: Shared instance in a VPC
- VPC_DEDICATED: Dedicated instance in a VPC







  • CLASSIC_SHARED: Shared instance (Classic Network)

  • VPC_SHARED: Shared instance (VPC)

  • VPC_DEDICATED: Dedicated instance (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.