AddSNSWeComAtPerson
API Request
URLs
POST zstack/v1/sns/application-endpoints/we-com/at-personsHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"userId": "18099997777",
"endpointUuid": "3af92b4b14e83963b8565f194f302fce",
"remark": "jack"
},
"systemTags": [],
"userTags": []
}
Note: 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":{"userId":"18099997777","endpointUuid":"3af92b4b14e83963b8565f194f302fce","remark":"jack"}}' \
http://localhost:8080/zstack/v1/sns/application-endpoints/we-com/at-personsRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| userId | String | body (contained in the params structure) | The WeCom Id. | 5.0.0 | |
| endpointUuid | String | body (contained in the params structure) | The UUID of the WeCom endpoint. | 5.0.0 | |
| resourceUuid | String | body (contained in the params structure) | Optional. The resource uuid. | 5.0.0 | |
| tagUuid | List | body (contained in the params structure) | Optional. The tag uuid list. | 5.0.0 | |
| systemTags | List | body | Optional. The system tags. | 5.0.0 | |
| userTags | List | body | Optional. The user tags. | 5.0.0 | |
| remark | String | body (contained in the params structure) | Optional. The remark. | 5.0.0 |
API Response
Sample
Response
{
"inventory": {
"uuid": "b354a3fbec2e449d92708ccfd4dabb17",
"userId": "18988887777",
"endpointUuid": "346f6422817e4147bf405a38d0b69f5e",
"remark": "jack"
}
}#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. | 5.0.0 |
| description | String | The brief description of the error. | 5.0.0 |
| details | String | The details about the error. | 5.0.0 |
| elaboration | String | The reserved field. Default value: null. | 5.0.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 5.0.0 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 5.0.0 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.0.0 |
| userId | String | The ID of the WeCom user. | 5.0.0 |
| endpointUuid | String | The UUID of the WeCom endpoint. | 5.0.0 |
SDK Sample
Java
SDK
AddSNSWeComAtPersonAction action = new AddSNSWeComAtPersonAction();
action.userId = "18099997777";
action.endpointUuid = "3af92b4b14e83963b8565f194f302fce";
action.remark = "jack";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddSNSWeComAtPersonAction.Result res = action.call();Python
SDK
AddSNSWeComAtPersonAction action = AddSNSWeComAtPersonAction()
action.userId = "18099997777"
action.endpointUuid = "3af92b4b14e83963b8565f194f302fce"
action.remark = "jack"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddSNSWeComAtPersonAction.Result res = action.call()