Updated on 2022-02-21 GMT+08:00

Modifying an API Group

Function

This API is used to modify the attributes of an API group. Only the name and remark attributes of an API group can be modified.

URI

The following table lists the HTTP/HTTPS request method and URI of the API.

Table 1 HTTP/HTTPS request method and URI

Request Method

URI

PUT

/v1.0/apigw/api-groups/{id}

The following table lists the parameter in the URI.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

id

Yes

String

API group ID

Request

Table 3 Parameter description

Parameter

Mandatory

Type

Description

name

Yes

String

API group name

An API group name consists of 3–64 characters, starting with a letter. Only letters, digits, and underscores (_) are allowed.

remark

No

String

Description of the API group

The description cannot exceed 255 characters.

Example request:

{
	"name": "api_group_001",
	"remark": "API group 001"
}

Response

Table 4 Parameter description

Parameter

Type

Description

id

String

API group ID

name

String

API group name

status

Integer

Status of the API group

sl_domain

String

Subdomain name that API Gateway automatically allocates to the API group

sl_domains

String

List of subdomain names that API Gateway automatically allocates to the API group

register_time

Timestamp

Time when the API group is created

update_time

Timestamp

Time when the API group was last modified

remark

String

Description of the API group

call_limits

Integer

Total number of times all APIs in the API group can be accessed. Set this parameter while considering the payload capacity of the backend service. By default, there is no limit on the number of API calls.

time_interval

Integer

Period of time for limiting the number of API calls

time_unit

String

Time unit for limiting the number of API calls

url_domains

Array of UrlDomainsResp objects

List of independent domain names bound to the API group

on_sell_status

Integer

Indicates whether the API group has been listed on the marketplace. The value can be:

  • 1: listed
  • 2: not listed
  • 3: under approval

is_default

Integer

Indicates whether the API group is the default API group. By default, the API group is not the default API group. The value can be:

  • 1: default API group
  • 2: non-default API group
Table 5 UrlDomainsResp

Parameter

Type

Description

id

String

Domain ID

domain

String

Domain name

cname_status

Integer

CNAME resolution status of the domain name, which can be:

  • 1: not resolved
  • 2: in progress
  • 3: successful
  • 4: failed

ssl_id

String

ID of the SSL certificate

ssl_name

String

Name of the SSL certificate

Example response:

{
	"id": "7efb2b91-155a-4f6a-9f45-c5c95a6e4950",
	"name": "api_group_001",
	"status": 1,
	"sl_domain": "0e91b83b-0774-4e8e-b187-2d695ed4743b.apigw.example.com",
        "sl_domains": ["0e91b83b-0774-4e8e-b187-2d695ed4743b.apigw.example.com","0e91b83b-0774-4e8e-b187-2d695ed4743b.apigw.example.cn"],
	"remark": "API group 001",
	"register_time": "2017-12-28T11:44:53Z",
	"update_time": "2017-12-28T11:49:01.048600577Z",
	"on_sell_status": 2,
        "is_default": 2
}

Status Codes

Table 6 Status codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict

500

Server Internal Error