AddSNSDingTalkAtPerson
API Request
URLs
POST zstack/v1/sns/application-endpoints/ding-talk/at-persons
Headers
Authorization: OAuth the-session-uuid
Body
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"phoneNumber": "18099997777",
"endpointUuid": "5b9b95ca0cda3ab4bb51b5a4e1965305"
},
"systemTags": [],
"userTags": []
}

Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"phoneNumber":"18099997777","endpointUuid":"5b9b95ca0cda3ab4bb51b5a4e1965305"}}' \
http://localhost:8080/zstack/v1/sns/application-endpoints/ding-talk/at-persons
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
phoneNumber | String | body (contained in the params structure) | The phone number of the DingTalk user. (Users register DingTalk with their phone numbers.) | 2.3 | |
endpointUuid | String | body (contained in the params structure) | The UUID of the DingTalk endpoint. | 2.3 | |
resourceUuid | String | body (contained in the params structure) | Optional. | 2.3 | |
systemTags | List | body | Optional. The system tags. | 2.3 | |
userTags | List | body | Optional. The user tags. | 2.3 |
API Response
Sample
Response
{
"inventory": {
"uuid": "a72aa83b023744828f52adf83d850ed7",
"phoneNumber": "18988887777",
"endpointUuid": "ad5dc331264c4bcbbe56ee2523cde7a2"
}
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 2.3 |
inventory | SNSDingTalkAtPersonInventory | See inventory. | 2.3 |
#error
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 0.6 |
description | String | The brief description of the error. | 0.6 |
details | String | The details about the error. | 0.6 |
elaboration | String | The reserved field. Default value: null. | 0.6 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
#inventory
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 2.3 |
phoneNumber | String | The phone number of the DingTalk user. | 2.3 |
endpointUuid | String | The UUID of the DingTalk endpoint. | 2.3 |
SDK Sample
Java
SDK
AddSNSDingTalkAtPersonAction action = new AddSNSDingTalkAtPersonAction();
action.phoneNumber = "18099997777";
action.endpointUuid = "5b9b95ca0cda3ab4bb51b5a4e1965305";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddSNSDingTalkAtPersonAction.Result res = action.call();
Python
SDK
AddSNSDingTalkAtPersonAction action = AddSNSDingTalkAtPersonAction()
action.phoneNumber = "18099997777"
action.endpointUuid = "5b9b95ca0cda3ab4bb51b5a4e1965305"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddSNSDingTalkAtPersonAction.Result res = action.call()