Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

Creating an Approver

Updated on 2022-09-15 GMT+08:00

Function

This API is used to create an approver.

URI

POST /v2/{project_id}/design/approvals/users

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

tenant id

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

approver_name

Yes

String

Approver name

Maximum: 100

user_id

Yes

String

Approver user ID

email

No

String

Maximum: 500

phone_number

No

String

Phone number

email_notify

No

Boolean

Email notification

Default: true

sms_notify

No

Boolean

SMS notification

Default: true

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

Long

Approver ID

approver_name

String

Approver name

Maximum: 20

user_id

String

Approver user ID

user_name

String

Approver username

email

String

Email information

user_type

String

Enumeration values:

  • BIZ_METRIC_OWNER

  • APPROVER

  • BIZ_METRIC_OWNER_AND_APPROVER

phone_number

String

Phone number

create_by

String

Creator username

create_time

String

Creation time

app_name

String

App name

topic_urn

String

SMN topic URN

project_id

String

tenant id

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.000 which indicates that the request was successfully processed.

error_msg

String

Error message

data

Object

Returned data

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.000 which indicates that the request was successfully processed.

error_msg

String

Error message

data

Object

Returned data

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.000 which indicates that the request was successfully processed.

error_msg

String

Error message

data

Object

Returned data

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.000 which indicates that the request was successfully processed.

error_msg

String

Error message

data

Object

Returned data

Example Requests

{
  "approver_name" : "test02",
  "user_id" : "bff6a1286d26402197ca5a70136fb326",
  "email" : "abdf@huawei.com",
  "phone_number" : "18700645123",
  "email_notify" : true,
  "sms_notify" : true
}

Example Responses

Status code: 200

The operation succeeds. ApproverVO is returned.

{
  "id" : "1586",
  "approver_name" : "test02",
  "user_id" : "bff6a1286d26402197ca5a70136fb326",
  "user_name" : "test02",
  "email" : "abdf@huawei.com",
  "user_type" : null,
  "phone_number" : "18700645123",
  "create_by" : "6273052b7ea44765a51304972c2dbaa3",
  "create_time" : "2022-08-30T02:50:57.000Z",
  "app_name" : "dlg_ds",
  "topic_urn" : "topic123",
  "project_id" : "0cf68da0ba80f2962ff7c01ba8c0b7f7-workspace-f7eee36e67e541a59679f9b1b7f4eab0"
}

Status Codes

Status Code

Description

200

The operation succeeds. ApproverVO is returned.

400

BadRequest

401

Unauthorized

403

Forbidden

404

Not Found

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback