Overview
Query the list of API keys under a specified organization and project in pagination mode.
API details
Constraints
The caller must have an AccessKey for accessing the multi-cloud API. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
GET /api/v2/maas/apikeys
Request parameters
Query
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| uid | string | No | Account ID, which is input from the network. If this parameter is missing, INVALID_PARAMETER is returned. | {uid} |
| Action | string | No | Query action identifier, which echoes the response action field. It can also be passed via a header with the same name. | ListAIServiceAPIKeys |
| pageNumber | integer | No | The page number, which starts from 1 and defaults to 1. | 1 |
| pageSize | integer | No | Number of records per page. The default value is 10, and the maximum value is 100. If this value exceeds the upper limit, the server will forcibly set it to 20. | 10 |
Header
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| Authorization | string | Yes | IAM authentication information. | -u ak:sk |
| requestId | string | No | Unique identifier of the request. | req-abc123 |
| X-Request-Id | string | No | Unique identifier of the request. | req-abc123 |
| X-OB-Org-Id | string | Yes | Organization ID, which is required for all APIs. | org-xxxxxxxx |
| X-OB-Project-Id | string | Yes | Project ID, which is required for all APIs. | proj-xxxxxxxx |
Response parameters
Parameter |
Type |
Description |
|---|---|---|
| action | string | Request action identifier. |
| data | object | The returned data object. |
| data.list | array | List of API keys. |
| data.list[].id | string | API Key ID. |
| data.list[].name | string | The name of the API key. |
| data.list[].createdAt | string | Creation time. |
| data.list[].updatedAt | string | Update time. |
| data.list[].expiresAt | string | Expiration time. |
| data.total | integer | Total Records. |
| requestId | string | Request ID. |
| server | string | Server address. |
Examples
Request example
curl -X GET \
'https://api-cloud.oceanbase.com/api/v2/maas/apikeys?pageNumber=1&pageSize=10' \
-u ak:sk \
-H 'X-OB-Org-Id: org-xxxxxxxx' \
-H 'X-OB-Project-Id: proj-xxxxxxxx' \
-H 'requestId: req-abc123'
Response example
{
"action": "ListAIServiceAPIKeys",
"data": {
"list": [
{
"id": "xxxxxx",
"name": "MyAPIKey",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z",
"expiresAt": "2025-01-01T00:00:00Z"
}
],
"total": 1
},
"requestId": "xxxxxx",
"server": "xxx.xxx.x.xxx:xxxx"
}
