> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Attendance Group Summaries

> Call this API to fuzzy search attendance groups by name and get summaries of matching attendance groups, including attendance group names and IDs.

Call this API to fuzzy search attendance groups by name and get attendance group summaries, including attendance group names and IDs.

## Request

| **Basic Information** | |
| - | - |
| HTTP URL | [https://api.dingtalk.io/topapi/attendance/group/search](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](https://help.dingtalk.io/open/development/obtain-orgapp-token) 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 theme={"theme":{"light":"github-light","dark":"github-dark"}}
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'
```

Java

```java theme={"theme":{"light":"github-light","dark":"github-dark"}}
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());
```

Python

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
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)
```

PHP

```php theme={"theme":{"light":"github-light","dark":"github-dark"}}
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");
```

C#

```csharp theme={"theme":{"light":"github-light","dark":"github-dark"}}
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

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "errcode": 0,
  "result": [
    {
      "id": 685935028,
      "name": "Attendance"
    }
  ],
  "success": true,
  "request_id": "750muu3wy9fu"
}
```

### Error Codes

If the call to this API returns an error, find a solution based on the error message in the [Global Error Codes](https://help.dingtalk.io/open/development/server-api-error-codes-1.md) document.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.