Updated on 2026-01-13 GMT+08:00

Adding a Device

Function

This API is used to add a new device to a project.

Calling Method

For details, see Calling APIs.

URI

POST /v1/{project_id}/devices

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

description

No

String

Description.

manage_url

No

String

Management address.

mode

Yes

String

Deployment mode.

name

Yes

String

Device name.

subnet_id

Yes

String

Subnet ID.

type

Yes

Integer

Device type, which can be 0 (application data audit), 1 (application data security gateway), 2 (database firewall), 3 (database encryption), 4 (static data masking instance), or 5 (dynamic database masking instance).

vpc_id

Yes

String

VPC ID.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

String

ID

msg

String

Message.

status

String

Response code.

Status code: 201

Resource being created.

Example Requests

POST /v1/{project_id}/devices

{
  "description" : "string",
  "manage_url" : "string",
  "mode" : "string",
  "name" : "string",
  "subnet_id" : "string",
  "type" : 0,
  "vpc_id" : "string"
}

Example Responses

None

Status Codes

Status Code

Description

200

Added.

201

Resource being created.

401

Unauthorized. The user is not logged in or the token is invalid.

403

Unauthorized to access the resource.

404

The specified project does not exist.

Error Codes

See Error Codes.