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

# ディスカバリー状態の取得

> ディスカバリージョブの状態を取得するエンドポイントです。

## GET /discovery/{discoveryId}

URL ディスカバリージョブの現在の状態と詳細を返します。

### パスパラメーター

<ParamField path="discoveryId" type="string" required>
  ディスカバリージョブの ID。
</ParamField>

### レスポンス

<ResponseField name="id" type="string">
  ディスカバリージョブの一意な識別子。
</ResponseField>

<ResponseField name="url" type="string">
  ディスカバリー対象の URL。
</ResponseField>

<ResponseField name="type" type="string">
  使用したディスカバリー手法: `full`、`sitemap`、`crawl`。
</ResponseField>

<ResponseField name="status" type="string">
  現在の状態: `pending`、`processing`、`completed`、`failed`。
</ResponseField>

<ResponseField name="urlsFound" type="number">
  現在までに発見した URL 数。
</ResponseField>

<ResponseField name="createdAt" type="string">
  ジョブ作成日時の ISO 8601 タイムスタンプ。
</ResponseField>

<ResponseField name="completedAt" type="string">
  完了した場合の完了日時の ISO 8601 タイムスタンプ（該当時）。
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://api.llmgenerator.com/api/v1/discovery/550e8400-e29b-41d4-a716-446655440000 \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.llmgenerator.com/api/v1/discovery/550e8400-e29b-41d4-a716-446655440000',
    {
      headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
    }
  );

  const status = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 処理中 theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "url": "https://example.com",
    "type": "full",
    "status": "processing",
    "urlsFound": 23,
    "createdAt": "2026-01-20T10:00:00.000Z",
    "completedAt": null
  }
  ```

  ```json 完了 theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "url": "https://example.com",
    "type": "sitemap",
    "status": "completed",
    "urlsFound": 47,
    "createdAt": "2026-01-20T10:00:00.000Z",
    "completedAt": "2026-01-20T10:05:00.000Z"
  }
  ```
</ResponseExample>
