Document navigation

AddSNSDingTalkAtPerson

API Request

URLs

POST zstack/v1/sns/application-endpoints/ding-talk/at-persons

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "phoneNumber": "18099997777",
    "endpointUuid": "5b9b95ca0cda3ab4bb51b5a4e1965305",
    "remark": "jack"
  },
  "systemTags": [],
  "userTags": []
}

In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"phoneNumber":"18099997777","endpointUuid":"5b9b95ca0cda3ab4bb51b5a4e1965305","remark":"jack"}}' \
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
tagUuid List body (contained in the params structure) Optional. The tag uuid list. 5.0.0
remark String body (contained in the params structure) Optional. The remark. 5.0.0

API Response

Sample Response

{
  "inventory": {
    "uuid": "af3c83c835234d11b1afe022e85d67ec",
    "phoneNumber": "18988887777",
    "endpointUuid": "7b9b311a1a6c445bbe48c02b52f91ef6",
    "createDate": "Dec 25, 2023 2:07:43 PM",
    "lastOpDate": "Dec 25, 2023 2:07:43 PM",
    "remark": "jack"
  }
}
Name Type Description Starting Version
success boolean Whether the operation succeeded. 5.0.0
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. 5.0.0
phoneNumber String The phone number of the DingTalk user. 5.0.0
endpointUuid String The UUID of the DingTalk endpoint. 5.0.0

SDK Sample

Java SDK

AddSNSDingTalkAtPersonAction action = new AddSNSDingTalkAtPersonAction();
action.phoneNumber = "18099997777";
action.endpointUuid = "5b9b95ca0cda3ab4bb51b5a4e1965305";
action.remark = "jack";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddSNSDingTalkAtPersonAction.Result res = action.call();

Python SDK

action = AddSNSDingTalkAtPersonAction()
action.phoneNumber = "18099997777"
action.endpointUuid = "5b9b95ca0cda3ab4bb51b5a4e1965305"
action.remark = "jack"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()