API Introduction
Call describeRootAccoun to query the database root account information of MongoDB instance.
API Restrictions
None
URI
GET /v1/accountsOpenApi/describeRootAccount
Path Parameter
None
Query Parameter
Parameter | Required or Not | Parameter Type | Description | Example |
prodInstId | Yes | String | External instance ID of the document database | 60d420bffb394397b4303be871a481e3 |
Request Parameters
Request Header Parameter
None
Response Parameter
Parameter | Required or Not | Parameter Type | Description | Lower-level Object | |
statusCode | Yes | Integer | Response Code Value range: 800 indicates success, 900 indicates failure | 800 | |
message | Yes | String | Response information | The host alarm rules of the MongoDB instance are queried successfully | |
returnObj | Yes | Object | Return object. | returnObj |
Table returnObj
Parameter | Required or Not | Parameter Type | Description | Example | Lower-level Object |
ProdInstId | Yes | String | Instance ID | 60d420bffb394397b4303be871a481e3 | |
AccountName | Yes | String | Account Name | root | |
ProdType | Yes | String | Instance type: 0 indicates a single node, 2 indicates one-master-two-slave | 2 | |
AccountStatus | Yes | String | Account status | Available | |
AccountDescription | Yes | String | Account remarks | Administrator |
Sample Request
Request Header
None
Request parameter query
/v1/accountsOpenApi/describeRootAccoun?prodInstId=60d420bffb394397b4303be871a481e3
Response Example
{
"statusCode": 800,
"message": "the account information of the MongoDB instance is queried successfully",
"returnObj": {
"AccountDescription": "Administrator",
"AccountStatus": "Available",
"ProdType": "2",
"ProdInstId": "60d420bffb394397b4303be871a481e3 ",
"AccountName": "root"
}
}Status Code
Status Code | Description |
800 | Indicate that the request succeeded |
900 | Indicates that the request failed |
Error Codes
None