> ## 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.

# スマート統計レポートの有効化状況の確認

> スマート統計レポートが有効化されているかを確認し、関連 API を呼び出せるか事前判定できる API です。

このAPIを呼び出して、社内で勤怠のスマートレポートが有効になっているかを確認します。スマートレポートが無効の場合、ほかの統計レポートAPIは呼び出せません。

## リクエスト

| **ベーシック情報** | |
| - | - |
| HTTP URL | [https://api.dingtalk.io/topapi/attendance/isopensmartreport](https://api.dingtalk.io/topapi/attendance/isopensmartreport) |
| HTTP メソッド | POST |
| 対応アプリタイプ | appType-社内アプリ　appType-サードパーティ社内アプリ |
| 権限 | permission-qyapi\_base-組織 API の呼び出しに必要なベーシック権限 |

### クエリパラメータ

| 名前 | タイプ | 必須 | 例 | 説明 |
| - | - | - | - | - |
| access\_token | 文字列 | はい | 6d1bxxxx | このAPIの呼び出しに使用するアプリ認証情報です。   - 社内アプリ：[社内アプリの access\_token を取得](https://help.dingtalk.io/ja/open/development/obtain-orgapp-token) APIを呼び出して取得します。 - サードパーティ社内アプリ：サードパーティ社内アプリの access\_token を取得するAPIを呼び出して取得します。 |

### リクエスト例

```curl theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api.dingtalk.io/topapi/attendance/isopensmartreport" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=b74b3xxxx0bb7c'
```

Java

```java theme={"theme":{"light":"github-light","dark":"github-dark"}}
DingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/isopensmartreport");
OapiAttendanceIsopensmartreportRequest req = new OapiAttendanceIsopensmartreportRequest();
OapiAttendanceIsopensmartreportResponse 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.OapiAttendanceIsopensmartreportRequest("https://api.dingtalk.io/topapi/attendance/isopensmartreport")

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 OapiAttendanceIsopensmartreportRequest;
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/attendance/isopensmartreport");
```

C#

```csharp theme={"theme":{"light":"github-light","dark":"github-dark"}}
IDingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/isopensmartreport");
OapiAttendanceIsopensmartreportRequest req = new OapiAttendanceIsopensmartreportRequest();
OapiAttendanceIsopensmartreportResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
```

## レスポンス

### レスポンスボディ

| 名前 | タイプ | 例 | 説明 |
| - | - | - | - |
| result | IsOpenSmartReportForTopVo | | 返却結果です。 |
| smart\_report | 真偽値 | true | スマート統計レポートが有効かどうかを示します。   - **true**：有効 - **false**：無効 |
| request\_id | 文字列 | 6f9h5mh9a94i | リクエスト ID です。 |
| errcode | 数値 | 0 | 戻りコードです。 |

### レスポンスボディの例

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "errcode": 0,
  "result": {
    "smart_report": true
  },
  "request_id": "6f9h5mh9a94i"
}
```

### エラーコード

API の呼び出しでエラーが返された場合は、エラーメッセージをもとに[グローバルエラーコード](https://help.dingtalk.io/ja/open/development/server-api-error-codes-1.md)ドキュメントで解決方法を検索してください。


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