Creating an Approver
Function
This API is used to create an approver.
URI
POST /v2/{project_id}/design/approvals/users
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
tenant id |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
approver_name |
Yes |
String |
Approver name Maximum: 100 |
user_id |
Yes |
String |
Approver user ID |
|
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
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 |
|
String |
Email information |
user_type |
String |
Enumeration values:
|
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
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
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
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
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
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.