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

# ネットワークログ

> アプリケーションのドメインに対するリクエスト単位のエッジログを取得します。

アプリケーションのプライマリドメインおよび設定済みのカスタムドメインに対する、リクエスト単位のエッジログ(HTTP、国、ステータス、バイト数)を返します。最大保持期間は7日間で、開始時刻はアプリケーションの作成日にクランプされます。

<Info>
  **Pro** および **Enterprise** プランでのみ利用できます。キャッシュミス時のレート制限: オーナーごとに60秒あたり10リクエスト。
</Info>

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  アカウントの API キーです。これは[アカウント設定](https://squarecloud.app/ja/account/security)で確認できます。
</ParamField>

### パラメータ

<ParamField path="app_id" type="string" placeholder="Application ID" required>
  アプリケーションのID。アプリケーションのダッシュボードのURLで確認できます。
</ParamField>

<ParamField query="start" type="string" placeholder="ISO 8601 timestamp" required>
  ISO 8601 形式の開始タイムスタンプ。アプリケーションの作成日より前、または7日より古い時刻は指定できません。
</ParamField>

<ParamField query="end" type="string" placeholder="ISO 8601 timestamp" required>
  ISO 8601 形式の終了タイムスタンプ。`start` より後である必要があります。
</ParamField>

### レスポンス

<ResponseField name="status" type="string">
  呼び出しが成功したかどうかを示します。成功した場合は `success`、失敗した場合は `error` です。
</ResponseField>

<ResponseField name="response" type="array">
  レスポンスの内容。

  <Expandable title="オブジェクトを切り替え">
    <ResponseField name="timestamp" type="string">
      ISO 形式のリクエストのタイムスタンプ。
    </ResponseField>

    <ResponseField name="client" type="object">
      リクエストを行ったクライアントに関する情報。

      <Expandable title="client オブジェクトを切り替え">
        <ResponseField name="ip" type="string | null">クライアントの IP アドレス。</ResponseField>
        <ResponseField name="country" type="string | null">クライアントの国コード。</ResponseField>
        <ResponseField name="location" type="string | null">クライアントのおおよその位置。</ResponseField>
        <ResponseField name="asn" type="string">クライアントの ASN。</ResponseField>
        <ResponseField name="agent" type="string | null">クライアントのユーザーエージェント。</ResponseField>
        <ResponseField name="category" type="string | null">クライアントのカテゴリ(例: bot、human)。</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="request" type="object">
      受信リクエストに関する情報。

      <Expandable title="request オブジェクトを切り替え">
        <ResponseField name="mitigated" type="boolean">リクエストがエッジ保護によって緩和(ブロック)されたかどうか。</ResponseField>
        <ResponseField name="method" type="string">使用された HTTP メソッド。</ResponseField>
        <ResponseField name="host" type="string">Host ヘッダーの値。</ResponseField>
        <ResponseField name="path" type="string">リクエストパス。</ResponseField>
        <ResponseField name="query" type="string | null">クエリ文字列。</ResponseField>
        <ResponseField name="protocol" type="string">使用されたプロトコル(例: HTTP/2)。</ResponseField>
        <ResponseField name="referer" type="string | null">Referer ヘッダーの値。</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="response" type="object">
      エッジで提供されたレスポンスに関する情報。

      <Expandable title="response オブジェクトを切り替え">
        <ResponseField name="status" type="integer">返された HTTP ステータスコード。</ResponseField>
        <ResponseField name="contentType" type="string | null">レスポンスのコンテンツタイプ。</ResponseField>
        <ResponseField name="cache" type="string | null">キャッシュステータス(例: HIT、MISS)。</ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "status": "success",
    "response": [
      {
        "timestamp": "2025-12-01T12:00:00.000Z",
        "client": {
          "ip": "203.0.113.45",
          "country": "BR",
          "location": "São Paulo",
          "asn": "12345 - Example ISP",
          "agent": "Mozilla/5.0",
          "category": null
        },
        "request": {
          "mitigated": false,
          "method": "GET",
          "host": "my-app.squareweb.app",
          "path": "/api/users",
          "query": "?limit=10",
          "protocol": "HTTP/2",
          "referer": null
        },
        "response": {
          "status": 200,
          "contentType": "application/json",
          "cache": "MISS"
        }
      }
    ]
  }
  ```
</ResponseExample>
