Document Database Service

Buy a New MongoDB Instance

2025-07-24 08:05:35
API Introduction

Call the newPurchaseOrderForMongoDB API to purchase a new MongoDB instance.

API Restrictions

None

URI
POST /v1/extApi/newPurchaseOrderForMongoDB

Path Parameter

None

Query Parameter

None

Request Parameters

Request Header Parameter

None

Request Body Parameter

Parameter

Required or Not

Parameter Type

Description

Example

Lower-level Object

instanceCnt

Yes

String

Subscription quantity, the value must be greater than zero and the subscription quantity cannot exceed 50 units

1


cycleCnt

Yes

String

Subscription cycle, the value must be greater than zero and the longest subscription duration cannot exceed 384 months.

1


cycleType

Yes

String

Subscription type, 3 for monthly subscription, 5 for one-year subscription, 6 for two-year subscription, and 7 for three-year subscription. The cycleCnt attribute is 1, and the value of cycleType is 3, which indicates 1 month subscription

3


cpuNum

Yes

String

Number of CPU Cores

2


memSize

Yes

String

Memory Capacity

4


engineVersion

Yes

String

Engine Version

WiredTiger 4.0


instanceType

Yes

String

Instance type: Single or Senior

Single


regionId

Yes

String

Resource pool id

100054c0416811e9a6690242ac110002


instanceName

Yes

String

Instance Name

mongo008


dbPassWord

Yes

String

Encrypted database root password

/r/cUXnFwSNLfP0=


subnetId

Yes

String

Subnet id

7d3fe61d-b279-4c2a-b190-afd9754125b4


vpcId

Yes

String

vpc information

07a41838-845c-467d-b2e8-e1001a9fc01f


secgroups

Yes

String

Security Group ID

aa8ddfb7-f042-4c57-bb25-7df09d5c732a


volumeType

Yes

String

Disk Type

SATA


diskSize

Yes

String

Disk Size

100


accessKey

Yes

String

Resource pool ak

4a4bdc57e06542199b5f98d4cd107be2


securityKey

Yes

String

Resource pool sk

5566ddcc9b1646c6b77a0eaeff1c8763


Response Parameter

Parameter

Required or Not

Parameter Type

Description

Example

Lower-level Object

statusCode

Yes

Integer

Response Code

Value range: 800 indicates success, 900 indicates failure

800


message

Yes

String

Response information

The new MongoDB instance is purchased successfully


returnObj

Yes

Object

Return object.



Table returnObj

Parameter

Required or Not

Parameter Type

Description

Example

Lower-level Object

newOrderNo

Yes

String

Order Number

true


submitted

Yes

Boolean

Order submission status



totalPrice

Yes

Integer

Total price of the order



newOrderId

Yes

String

Order ID



errorMessage

Yes

String

Error Message



Sample Request

Request Header

None

Request Body

{
    "instanceCnt":"1",
    "cycleCnt":"1",
    "cycleType":"3",
    "cpuNum":"2",
    "memSize":"4",
    "engineVersion":"WiredTiger 4.0",
    "instanceType":"Single",
    "regionId":"100054c0416811e9a6690242ac110002",
    "instanceName":"mongo008",
    "dbPassWord":"/r/cUXnFwSNLfP0=",
    "subnetId":"7d3fe61d-b279-4c2a-b190-afd9754125b4",
    "vpcId":"07a41838-845c-467d-b2e8-e1001a9fc01f",
    "secgroups":"aa8ddfb7-f042-4c57-bb25-7df09d5c732a",
    "volumeType":"SATA",
    "diskSize":"100",
    "accessKey":"4a4bdc57e06542199b5f98d4cd107be2",
    "securityKey":"5566ddcc9b1646c6b77a0eaeff1c8763"
}
Response Example
{
    "statusCode": 800,
    "message": "the new MongoDB instance is purchased successfully",
    "returnObj": {
        "newOrderNo": "20221124112017724841",
        "submitted": true,
        "totalPrice": 477.0,
        "newOrderId": "df180385a2324d19ade154d3bb78b8d6",
        "errorMessage": ""
    }
}
Status Code

Status Code

Description

800

Indicate that the request succeeded

900

Indicates that the request failed

Error Codes

None


2pJ_rnt6XpBH