查询企业微信@用户

GET/zstack/v1/sns/application-endpoints/we-com/at-persons
GET/zstack/v1/sns/application-endpoints/we-com/at-persons/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl示例

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sns/application-endpoints/we-com/at-persons?q=uuid=ec74d6afc6fa32419a8e22857038dca8&q=endpointUuid=b1a06b4282043ec39305377a3df1c99d
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/sns/application-endpoints/we-com/at-persons/8ab29c25622e3419b5690b6002596af3

可查询字段

运行zstack-cli命令行工具,输入QuerySNSWeComAtPerson并按Tab键查看所有可查询字段以及可跨表查询的资源名。

API返回

该API成功时返回一个空的JSON结构**{}**,出错时返回的JSON结构包含一个error字段,例如:

{
  "inventories": [
    {
      "uuid": "02be8517bdda3a3990343870d24a55df",
      "userId": "zhang.san",
      "endpointUuid": "6c8dafc01f3135ec954d6fd937f4e0e1"
    }
  ]
}
名字类型描述起始版本
successboolean 4.2.0
errorErrorCode错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error4.2.0
inventoriesList详情参考inventories4.2.0

error

名字类型描述起始版本
codeString错误码号,错误的全局唯一标识,例如SYS.1000, HOST.10015.0.0
descriptionString错误的概要描述5.0.0
detailsString错误的详细信息5.0.0
elaborationString保留字段,默认为null5.0.0
opaqueLinkedHashMap保留字段,默认为null5.0.0
causeErrorCode根错误,引发当前错误的源错误,若无原错误,该字段为null5.0.0

inventories

名字类型描述起始版本
uuidString资源的UUID,唯一标示该资源4.2.0
userIdString企业微信用户id4.2.0
endpointUuidString企业微信endpoint uuid4.2.0

SDK示例

Java SDK

QuerySNSWeComAtPersonAction action = new QuerySNSWeComAtPersonAction();
action.conditions = asList("uuid=4bd23fb21c7d3d4d9d5d18b794ab05d0","endpointUuid=a0b96b1f27fa3ef992e1fd37b1ab58f9");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QuerySNSWeComAtPersonAction.Result res = action.call();

Python SDK

QuerySNSWeComAtPersonAction action = QuerySNSWeComAtPersonAction()
action.conditions = ["uuid=0f5346ee4a9d36da9228e57e3249f853","endpointUuid=6f42b53c5a9336368921441afdf19583"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QuerySNSWeComAtPersonAction.Result res = action.call()