ボットの明示と設定を確認する
GET/me/bots/{did}/doctor
認証付き HTTP API でダッシュボードのチェックアップを利用できます。各チェックの状態と修正用リンクを返し、毎回ボットの Bluesky プロフィールを読み取ります。`id` と `status` は安定しています。`message` は英語で、変わることがあります。未知のチェック ID は無視してください。提案段階の外部コマンド `bsbot doctor` は、記録した npm CLI 0.1.0 にはありません。
パラメーター
| 名前 | 場所 | 型 | 説明 |
|---|---|---|---|
| did (必須) | path | string | `GET /me/bots` が返すボットの DID。 |
レスポンス
| ステータス | 説明 | 本文 |
|---|---|---|
| 200 | ボットのチェックアップ。 | Checkup |
| 401 | トークンがない、期限切れ、または取り消されています(コード `unauthorized`)。もう一度 `bsbot login` を実行してください。 | Error |
| 403 | ボットが停止されている(`forbidden`)か、トークンに `handles` スコープがないか 1 つのボットに限定されています(`insufficient_scope`)。 | Error |
| 404 | あなたのアカウントにそのボットがないか、ボットのハンドルのサブドメインです(API はメインサイトでのみ提供されます)。 | Error |
| 429 | レート制限に達しました:IP ごとの `publicApi`、アカウントごとの `creatorApi`、そしてアカウントごとの `botDoctor`(1 時間に 120 回、ダッシュボードの「もう一度チェック」と共有)。 | Error |
| 500 | 予期しないエラー。 | Error |
例
curl \
-H "Authorization: Bearer $BLUESKY_BOT_TOKEN" \
https://bluesky.bot/api/v1/me/bots/did:plc:yourbot/doctorスキーマ
Error
| フィールド | 型 | 説明 |
|---|---|---|
| error (必須) | object | |
| error.code (必須) | string: "bad_request", "invalid_handle", "not_found", "rate_limited", "internal_error", "unauthorized", "forbidden", "conflict", "invalid_grant", "upstream_error", "insufficient_scope", "invalid_listing", "consent_required" | |
| error.message (必須) | string | |
| error.reason | string | `invalid_handle`、`invalid_listing`、`conflict`、`forbidden` の場合。例:`reserved`、`taken`、`too_long`、`no_handle`、`suspended`。 |
| error.url | string, uri | consent_required の場合、このダッシュボードページを開いてプロフィールの編集を許可してください。 |
| error.field | string | `invalid_listing` の場合:拒否されたフィールド。 |
| error.scope | string | `insufficient_scope` の場合:トークンに足りないスコープ。 |
| error.parameter | string | 無効なクエリパラメーター。 |
| error.retryAfterSeconds | integer (1–) | `rate_limited` の場合。 |
Checkup
| フィールド | 型 | 説明 |
|---|---|---|
| bot (必須) | object | |
| bot.did (必須) | string | |
| bot.handle (必須) | string | null | 取得した `*.bluesky.bot` ハンドル。ない場合は null。 |
| checkedAt (必須) | string, date-time | |
| summary (必須) | object | `total` のうち `passed` 件が合格です。合計は合格・提案・要修正のチェック数です(`info` と `unknown` は数えません)。`fail` は要修正、`warn` は提案の数です。 |
| summary.passed (必須) | integer (0–) | |
| summary.total (必須) | integer (0–) | |
| summary.fail (必須) | integer (0–) | |
| summary.warn (必須) | integer (0–) | |
| checks (必須) | Check[] |
Check
| フィールド | 型 | 説明 |
|---|---|---|
| id (必須) | string | 現在は `automation_label`、`bio_disclosure`、`avatar`、`description`、`operator`、`handle`、`listed`。今後増えることがあります。 |
| status (必須) | string: "pass", "warn", "fail", "info", "unknown" | `fail`:要修正。`warn`:提案。`info`:任意。`unknown`: Bluesky から応答がありませんでした。 |
| message (必須) | string | |
| fixUrl (必須) | string | null | 修正する場所。合格または不明のときは null。 |
| docsUrl (必須) | string | null |