> For the complete documentation index, see [llms.txt](https://docs.nexthink.com/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexthink.com/platform/ja/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/api-and-integrations-classic/audit-trail-api-classic.md).

# 監査証跡API (クラシック)

{% hint style="warning" %}
このページの\_Audit Trail API\_手順に従うのは、Experienceイベント（Engine, Finder）の追跡がまだ必要な場合のみとしてください。

その他のExperienceの新しい統合には、NQL APIエクスポートまたはAzure Data Lake用のデータエクスポーターを使用してください。 [監査ログのエクスポート](/platform/ja/security/exporting-audit-logs.md)ドキュメントを参照してください。
{% endhint %}

## 認証 <a href="#audittrailapi-classic-authentication" id="audittrailapi-classic-authentication"></a>

Audit Trail APIを呼び出すには、管理者権限を持つローカルユーザーが必要です。

権限オプションの詳細については、[役割](https://docs.nexthink.com/platform/ja/configuring-your-platform/administration/account-management/roles/)のドキュメントを参照してください。

### ユーザーアカウント <a href="#audittrailapi-classic-useraccount" id="audittrailapi-classic-useraccount"></a>

クライアントを認証するために、Audit Trail APIは基本認証をサポートしています。 Nexthinkはそのための専用ローカルアカウントの作成を推奨します。

### OAuth <a href="#audittrailapi-classic-oauth" id="audittrailapi-classic-oauth"></a>

Nexthinkのインスタンスを設定して、アクセスの委任を行うオープン標準であるOAuthを使用してAudit Trail APIへのアクセスを許可することができます。 [Nexthink サポート](https://support.nexthink.com/)に問い合わせて、詳細情報を入手してください。

## Audit Trail APIを呼び出す <a href="#audittrailapi-classic-callingtheaudittrailapi" id="audittrailapi-classic-callingtheaudittrailapi"></a>

### ユーザーアカウント <a href="#audittrailapi-classic-useraccount.1" id="audittrailapi-classic-useraccount.1"></a>

Nexthinkインスタンスの監査ログファイルを取得するには、次のURLのいずれかを使用してGETリクエストを送信してください。

Nexthink Webインターフェイスの監査ログを取得します。

`https://<instance_FQDN>/audit-trail/api/v1/portal/type/auditlog`

特定のEngine（クラシック）の監査ログを取得します。

`https://<instance_FQDN>/audit-trail/api/v1/engine/<Engine_Hostname>/type/auditlog`

すべてのエンジン（クラシック）の監査ログを取得します。

`https://<instance_FQDN>/audit-trail/api/v1/engines/type/auditlog`

### OAuth <a href="#audittrailapi-classic-oauth.1" id="audittrailapi-classic-oauth.1"></a>

Nexthinkインスタンスの監査ログファイルを取得するには、次のURLのいずれかを使用してGETリクエストを送信してください。\
Nexthink Webインターフェイスの監査ログを取得します。

`https://agora.<region>.nexthink.cloud/audit-trail/api/v1/portal/type/auditlogを参照してください`

特定のEngine（クラシック）の監査ログを取得します。

`https://agora.<region>.nexthink.cloud/audit-trail/api/v1/engine/<Engine_Hostname>/type/auditlog`

すべてのエンジン（クラシック）の監査ログを取得します。

`https://agora.<region>.nexthink.cloud/audit-trail/api/v1/engines/type/auditlogを参照してください`

`<region>`はオンボーディング時に組織に割り当てられたNexthinkインスタンスの地域に一致する必要があります。

トークンを生成する際には、次のスコープを使用してください：`service:audit-trail`。

トークンを生成する際には、次のスコープを使用してください：`service:audit-trail`。

詳細な情報については、[その他の統合（クラシック）](/platform/ja/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/api-and-integrations-classic/other-integrations-classic.md)ドキュメントを参照してください。

## オプションのパラメーター <a href="#audittrailapi-classic-optionalparameters" id="audittrailapi-classic-optionalparameters"></a>

期間を取得するには、次のオプションのパラメーターを使用してください。

* **before\_date:** 指定された日付または日時より前のすべてのイベントを返します。 フォーマット：`yyyy-mm-ddThh:mm:ss`（例：`2024-12-24`または`2024-12-24T14:00:00`）。
* **elapsed\_hours:** 現在からの、あるいは指定された場合は**before\_date**からの指定された期間のすべてのイベントを返します。

これらのパラメーターは独立して使用することができます。

## 監査トレイルAPIのレスポンス <a href="#audittrailapi-classic-responseoftheaudittrailapi" id="audittrailapi-classic-responseoftheaudittrailapi"></a>

監査トレイルAPIは、ターゲットインスタンス内の監査ログファイルの内容を返します。 すべてのエンジン（クラシック）の監査ログを取得するための呼び出しの場合、レスポンスは接続された各エンジン（クラシック）の監査ログファイルを連結した結果です。

### エラー条件 <a href="#audittrailapi-classic-errorconditions" id="audittrailapi-classic-errorconditions"></a>

失敗した場合、監査トレイルAPIへの呼び出しは、HTTPエラーコードと共にJSON配列形式でエラーレスポンスを返します。

| エラータイプ         | HTTPコード       | 原因                                           |
| -------------- | ------------- | -------------------------------------------- |
| エンジンエラー（クラシック） | 内部サーバーエラー 500 | <ul><li>未知のエンジン名</li><li>到達不能なエンジン</li></ul> |

***

関連参照

* [監査トレイル](/platform/ja/security/exporting-audit-logs.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nexthink.com/platform/ja/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/api-and-integrations-classic/audit-trail-api-classic.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
