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

Querying the Approver List

Function

This API is used to query the approver list.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

tenant id

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

approver_name

No

String

Approver name

limit

No

Integer

Number of records to be queried, that is, Y records. The value ranges from 1 to 100. The default value is 50.

Maximum: 100

Default: 50

offset

No

Integer

Query offset, that is, X data records are skipped. The value must be 0 or an integer multiple of limit. If the value does not meet the requirements, it will be rounded down. The default value is 0.

Default: 0

Request Parameters

None

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

None

Example Responses

Status code: 200

The operation succeeds, and ApproverVO and the number of approvers are 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, and ApproverVO and the number of approvers are returned.

400

BadRequest

401

Unauthorized

403

Forbidden

404

Not Found