Updated on 2025-11-17 GMT+08:00

Buying a DataArts Studio Instance

Function

This API is used to buy a DataArts Studio instance.

Calling Method

For details, see Calling APIs.

URI

POST /v1/{project_id}/instances/onekey-purchase

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Project ID and Account ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. This parameter is mandatory when token authentication is used. You can obtain it from the value of X-Subject-Token in the response message header returned by the "Obtaining a User Token" API of the IAM service.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

region_id

Yes

String

Call the "Querying the Region List" API of ManageOneIAM to obtain the region ID in the response message.

commodity_id

No

String

Order ID

product_id

No

String

Product ID

period_type

Yes

Integer

Period type, which can be 2 (month) or 3 (year)

period_num

Yes

Integer

Number of subscription periods. The value is greater than 0.

availability_zone

Yes

String

AZ

vpc_id

Yes

String

Virtual NIC ID

security_group_id

Yes

String

Security group ID, which can be obtained from the current security group list

net_id

Yes

String

Subnet ID, which can be obtained from the VPC list

instance_name

Yes

String

Instance name

eps_id

Yes

String

Enterprise project ID. For details about how to obtain the enterprise project ID, see Project ID and Account ID.

is_auto_renew

Yes

Integer

Whether to enable auto renewal

promotion_info

No

String

Promotion information

extesion_package_type

No

String

Incremental package type

binding_instance_id

No

String

DataArts Studio instance ID. For details about how to obtain the instance ID, see Instance ID and Workspace ID.

cdm_version

No

String

CDM version

resource_spec_code

Yes

String

Instance specifications code

cloud_service_type

No

String

Cloud service type

resource_type

No

String

Resource type

tags

No

Array of TmsTagDTO objects

TMS tags

Table 4 TmsTagDTO

Parameter

Mandatory

Type

Description

key

Yes

String

Key

value

Yes

String

Value

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

order_id

String

Order ID

resource_id

String

Instance ID

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Returned error information.

error_code

String

Returned error code.

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Returned error information.

error_code

String

Returned error code.

Example Requests

{
  "region_id" : "xxxxxx",
  "period_type" : 2,
  "period_num" : 1,
  "availability_zone" : "xxxxxx",
  "vpc_id" : "000aaa00-8ece-44c0-963c-b6ed0e105c34",
  "net_id" : "5a6411c1-1487-420c-8c97-c264a6dae12e",
  "security_group_id" : "01263337-b511-4de3-ab2d-f57d9af67d1e",
  "eps_id" : "9dc0e37c-c117-48c7-8c6d-ac4b27cfc8a8",
  "instance_name" : "DGC-0722",
  "resource_spec_code" : "dayu.nb.professional",
  "is_auto_renew" : 0,
  "promotion_info" : ""
}

Example Responses

Status code: 400

Bad request.

{
  "error_code" : "DAYU.4402",
  "error_msg" : "The operation failed, detail msg {0}."
}

Status code: 500

Internal server error.

{
  "error_code" : "DAYU.3531",
  "error_msg" : "Internal server error: {0}"
}

Status Codes

Status Code

Description

200

The instance ID and order ID are returned.

400

Bad request.

500

Internal server error.