Request
| Basic Information | |
|---|---|
| HTTP URL | https://api.dingtalk.io/topapi/attendance/group/search |
| HTTP Method | POST |
| Supported App Types | appType-Internal app appType-Third-party enterprise app |
| Required Permissions | permission-qyapi_attendance_group_read-Attendance group read permission |
Query Parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | bE74xxxx | The App credential used to call this API. - Internal app: Call the Get the access_token of an Internal App API to obtain it. - Third-party enterprise app: Call the Get the access_token of a Third-Party Organization API to obtain it. |
Request Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| op_user_id | String | Yes | manager123 | The userId of the operator. |
| group_name | String | Yes | Attendance | The attendance group name. |
Request Example
curl -X POST "https://api.dingtalk.io/topapi/attendance/group/search" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=d7689axxxx70e7a' \
-d 'group_name=%Exxxx%BA%97' \
-d 'op_user_id=dd_dd'
DingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/group/search");
OapiAttendanceGroupSearchRequest req = new OapiAttendanceGroupSearchRequest();
req.setOpUserId("manager123");
req.setGroupName("Attendance");
OapiAttendanceGroupSearchResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());
import dingtalk.api
req=dingtalk.api.OapiAttendanceGroupSearchRequest("https://api.dingtalk.io/topapi/attendance/group/search")
req.op_user_id="dd_dd"
req.group_name="Xixi Store"
try:
resp= req.getResponse(access_token)
print(resp)
except Exception,e:
print(e)
include "TopSdk.php";
date_default_timezone_set('Asia/Shanghai');
$c = new DingTalkClient(DingTalkConstant::$CALL_TYPE_OAPI, DingTalkConstant::$METHOD_POST , DingTalkConstant::$FORMAT_JSON);
$req = new OapiAttendanceGroupSearchRequest;
$req->setOpUserId("dd_dd");
$req->setGroupName("Xixi Store");
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/attendance/group/search");
IDingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/group/search");
OapiAttendanceGroupSearchRequest req = new OapiAttendanceGroupSearchRequest();
req.OpUserId = "dd_dd";
req.GroupName = "Xixi Store";
OapiAttendanceGroupSearchResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
Response
Response Body
| Name | Type | Example | Description |
|---|---|---|---|
| result | TopMinimalismGroupVO[] | The query result. | |
| name | String | Attendance | The attendance group name. |
| id | Number | 685935028 | The attendance group ID. |
| success | Boolean | true | Indicates whether the query succeeded. - true: Success - false: Failed |
| errcode | Number | 0 | The return code. |
| request_id | String | 750mu3wy9fu | The request ID. |
Response Body Example
{
"errcode": 0,
"result": [
{
"id": 685935028,
"name": "Attendance"
}
],
"success": true,
"request_id": "750muu3wy9fu"
}