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

# アプリケーションログの取得

> アプリケーションの最新 1000 行のログを収集します。5 秒あたり 1 リクエストのレート制限があります。

<Warning>
  このエンドポイントには厳格なレート制限があります。**いずれか**の制限を超えると `429 Too Many Requests` が返されます:

  * ユーザーごと、アプリケーションごとに **5 秒あたり 1 リクエスト**。
  * 全アプリケーションを通じてユーザーごとに **10 秒あたり 20 リクエスト**、その後 **30 秒のクールダウン**。

  `429` を受け取った場合は、そのアプリケーションのポーリングを停止し、再試行する前に少なくともクールダウン（約 30 秒）待機してください。
</Warning>

<Tip>
  このエンドポイントは、ログの**特定時点のスナップショット**（ログタブを開く、または手動更新）にのみ使用してください。**ライブで継続的なログ**が必要な場合は、[リアルタイムログ](/ja/api-reference/endpoint/apps/realtime)（SSE）エンドポイントを使用してください。こちらはこのレート制限に達することなくログをリアルタイムでストリーミングします。
</Tip>

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

### レスポンス

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

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

  <Expandable title="オブジェクトを表示">
    <ResponseField name="logs" type="string">
      アプリケーションの最新のログ。
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
      "status": "success",
      "response": {
          "logs": "Working!"
      }
  }
  ```
</ResponseExample>
