Querying API Groups
Function
This API is used to query API groups.
You can call this API to query all of your API groups.
Debugging
You can use API Explorer to debug this API.
URI
GET /v2/{project_id}/apigw/instances/{instance_id}/api-groups
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain a project ID, see "Appendix" > "Obtaining a Project ID" in this document. |
|
instance_id |
Yes |
String |
Gateway ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
offset |
No |
Long |
Offset from which the query starts. If the value is less than 0, it is automatically converted to 0. Default: 0 |
|
limit |
No |
Integer |
Number of records displayed on each page. Minimum: 1 Maximum: 500 Default: 20 |
|
id |
No |
String |
API group ID. |
|
name |
No |
String |
API group name. |
|
precise_search |
No |
String |
Parameter name for exact matching. Only API group names are supported. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token, which can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
size |
Integer |
Length of the returned resource list. |
|
total |
Long |
Number of resources that match the query conditions. |
|
groups |
Array of ApiGroupInfoPage objects |
API groups. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
None
Example Responses
Status code: 200
OK
{
"total" : 2,
"size" : 2,
"groups" : [ {
"update_time" : "2020-07-31T06:55:55Z",
"name" : "api_group_001",
"on_sell_status" : 2,
"remark" : "API group 1",
"sl_domains" : [ "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com", "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.cn" ],
"sl_domain" : "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com",
"id" : "c77f5e81d9cb4424bf704ef2b0ac7600",
"register_time" : "2020-07-31T06:55:55Z",
"status" : 1,
"is_default" : 2
}, {
"update_time" : "2020-06-24T15:29:42.421926Z",
"name" : "api_group_002",
"on_sell_status" : 2,
"remark" : "API group 2",
"sl_domain" : "02a8ab3cb2784de5a096852829671ae7.apic.****.com",
"sl_domains" : [ "02a8ab3cb2784de5a096852829671ae7.apic.****.com", "02a8ab3cb2784de5a096852829671ae7.apic.****.cn" ],
"id" : "02a8ab3cb2784de5a096852829671ae7",
"register_time" : "2020-06-24T15:29:42.421926Z",
"status" : 1,
"is_default" : 2
} ]
}
Status code: 400
Bad Request
{
"error_code" : "APIG.2012",
"error_msg" : "Invalid parameter value,parameterName:name. Please refer to the support documentation"
}
Status code: 401
Unauthorized
{
"error_code" : "APIG.1002",
"error_msg" : "Incorrect token or token resolution failed"
}
Status code: 403
Forbidden
{
"error_code" : "APIG.1005",
"error_msg" : "No permissions to request this method"
}
Status code: 500
Internal Server Error
{
"error_code" : "APIG.9999",
"error_msg" : "System error"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
500 |
Internal Server Error |
Error Codes
See Error Codes.
Last Article: Querying Details of an API Group
Next Article: Environment Management
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.