Updated on 2024-01-19 GMT+08:00

Querying the List of Purchased API Groups

Function

This API is used to query the list of purchased API groups.

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

GET

/v1.0/apigw/purchases/groups[?page_size, page_no, id, group_id, group_name]

  • A combination of different query conditions can be added at the end of the URI by using question marks (?) and ampersands (&).
  • Query conditions include: id, group_id, group_name, page_size, and page_no.

The following table lists the parameters in the URI.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

id

No

String

Subscription ID

group_id

No

String

API group ID

group_name

No

String

API group name

page_size

No

Integer

Number of records displayed on each page. The default value is 20.

page_no

No

Integer

Page number. The default value is 1.

Request

N/A

Response

Table 3 Parameter description

Parameter

Type

Description

total

Integer

Total number of API groups that match the query conditions

size

Integer

Number of returned API groups

purchases

Dictionary

API group list

Table 4 Parameter description of purchases

Parameter

Type

Description

id

String

Subscription ID

group_id

String

API group ID

group_name

String

API group name

group_remark

String

Description of the API group

order_time

Timestamp

Time when the order is placed

start_time

Timestamp

Time when the order takes effect

expire_time

Timestamp

Time when the order expires

group_domains

[]String

List of API group domain names. No value will be returned when you query the list of purchased API groups.

quota_left

Integer

Remaining API call quota

quota_used

Integer

Used API call quota

app_key

String

Generated AppKey

app_secret

String

Generated AppSecret

Example response:

{
	"total": 3,
	"size": 3,
	"purchases": [{
		"id": "615af8d9-f31d-4cdf-8807-b191dc969a07",
		"group_id": "f0585333-5722-4878-b7fa-31ae00b6ae3a",
		"group_name": "api_group_003",
		"group_remark": "API group 003",
		"group_domains": null,
		"quota_used": 0,
		"quota_left": 2000000000,
		"order_time": "2017-12-29T06:22:46Z",
		"start_time": "2018-01-01T00:00:00Z",
		"expire_time": "2019-01-01T00:00:00Z",
		"app_key": "0e24****4785",
		"app_secret": "******"
	},
	{
		"id": "9d0b****e4d13",
		"group_id": "02a8****71ae7",
		"group_name": "api_group_002",
		"group_remark": "API group 002",
		"group_domains": null,
		"quota_used": 0,
		"quota_left": 2000000000,
		"order_time": "2017-12-29T06:22:46Z",
		"start_time": "2018-01-01T00:00:00Z",
		"expire_time": "2019-01-01T00:00:00Z",
		"app_key": "0e242****04785",
		"app_secret": "******"
	},
	{
		"id": "3f30d****c587",
		"group_id": "73c5802****47f09",
		"group_name": "api_group_001",
		"group_remark": "API group 001",
		"group_domains": null,
		"quota_used": 0,
		"quota_left": 2000000000,
		"order_time": "2017-12-29T06:16:03Z",
		"start_time": "2018-01-01T00:00:00Z",
		"expire_time": "2019-01-01T00:00:00Z",
		"app_key": "0e242****4785",
		"app_secret": "******"
	}]
}

Status Codes

Table 5 Status codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

500

Server Internal Error