CreateBatchConsumer
Creates API keys in batches.
Try it now
Test
RAM authorization
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| GwClusterId |
string |
Yes |
The gateway instance ID. |
pg-xxxxxxxx |
| Count |
integer |
Yes |
The number of user API keys to create. |
1 |
| ConsumerGroupId |
string |
Yes |
The ID of the user group. |
cg-xxxxxx |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request and prevent repeated request submissions. The value is generated by the client and must be unique among different requests. The value is case-sensitive and cannot exceed 64 ASCII characters in length. |
6000170000591aed949d0f5******************** |
| RegionId |
string |
Yes |
The region ID. |
cn-beijing |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
A7E6A8FD-C50B-46B2-BA85-D8B8D3****** |
| TotalRecordCount |
integer |
The total number of records. |
2 |
| PageRecordCount |
integer |
The number of records on the current page. |
1 |
| PageNumber |
integer |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
The number of records per page. Valid values:
Default value: 30. |
30 |
| TotalPages |
integer |
The total number of pages. |
1 |
| Items |
array<object> |
The list of consumer objects. |
|
|
object |
The consumer object. |
||
| ConsumerId |
string |
The user ID. |
c-mqveroemc*** |
| Name |
string |
The name. |
test |
| ConsumerGroupId |
string |
The ID of the user group. |
cg-xxxxxx |
| ConsumerTag |
string |
The consumer tag. |
test |
| ApiKey |
string |
The complete API key. This value is returned only in the current response. |
xxxxxxxx |
| GwClusterId |
string |
The gateway instance ID. |
pg-xxxxxxxxxx |
| ApiStatus |
string |
The API key status. Default value: Active. |
Active |
| Status |
string |
The consumer status. Default value: Enabled. |
Enabled |
Examples
Success response
JSON format
{
"RequestId": "A7E6A8FD-C50B-46B2-BA85-D8B8D3******",
"TotalRecordCount": 2,
"PageRecordCount": 1,
"PageNumber": 1,
"PageSize": 30,
"TotalPages": 1,
"Items": [
{
"ConsumerId": "c-mqveroemc***",
"Name": "test",
"ConsumerGroupId": "cg-xxxxxx",
"ConsumerTag": "test",
"ApiKey": "xxxxxxxx",
"GwClusterId": "pg-xxxxxxxxxx",
"ApiStatus": "Active",
"Status": "Enabled"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.