エンティティ詳細取得
指定したエンティティの詳細情報を返します。リンクされたエージェント実行、他のエンティティとのリレーションシップ、メタデータを含みます。リクエスト
GET /api/v1/graph/entity/{entityId}
パスパラメータ
| パラメータ | 型 | 説明 |
|---|---|---|
entityId | string | エンティティ ID |
ヘッダー
| ヘッダー | 必須 | 説明 |
|---|---|---|
Authorization | はい | Bearer snorbe_... 形式の API キー |
ワークスペースは API キーに紐づくものが自動的に使用されます。
workspaceId パラメータは不要です。レスポンス
{
"id": "clxxx001",
"label": "Lithium-Ion Battery",
"category": "technology",
"kind": "entity",
"description": "A type of rechargeable battery...",
"metadata": {
"url": { "value": "https://example.com/battery", "type": "text" }
},
"communityId": 3,
"pagerank": 0.045,
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-03-20T14:22:00.000Z",
"linkedEntities": [
{
"id": "clxxx002",
"label": "Solid-State Electrolyte",
"category": "technology",
"kind": "material",
"relationships": [
{ "direction": "outgoing", "type": "related_to", "weight": 0.85 }
]
}
],
"agentRuns": [
{
"id": "clrun001",
"status": "completed",
"process": [],
"createdAt": "2026-04-01T09:00:00.000Z",
"updatedAt": "2026-04-01T09:05:00.000Z",
"agentId": "clagent001",
"agentName": "research-agent",
"linkedSources": [
{
"id": "clsrc001",
"url": "https://example.com/paper",
"title": "Research Paper",
"sourceType": "public"
}
],
"linkedEntityIds": ["clxxx001", "clxxx002"],
"linkedEntities": [
{
"id": "clxxx002",
"label": "Solid-State Electrolyte",
"category": "technology",
"kind": "material"
}
]
}
]
}
null を返します。
レスポンスフィールド
| フィールド | 型 | 説明 |
|---|---|---|
id | string | エンティティ ID |
label | string | エンティティ名 |
category | string | カテゴリ(例: technology, company) |
kind | string | ノード種別(entity, ghost) |
description | string | エンティティの説明 |
metadata | object | null | エンティティに付与されたキーバリュー形式のメタデータ。各値は value(文字列)と type(文字列)フィールドを持つ |
communityId | number | コミュニティクラスタ ID |
pagerank | number | PageRank スコア |
createdAt | string | 作成日時(ISO 8601) |
updatedAt | string | 更新日時(ISO 8601) |
linkedEntities | object[] | グラフエッジで直接接続されているエンティティの配列 |
linkedEntities[].id | string | リンク先エンティティ ID |
linkedEntities[].label | string | リンク先エンティティ名 |
linkedEntities[].category | string | リンク先エンティティのカテゴリ |
linkedEntities[].kind | string | リンク先エンティティの種別 |
linkedEntities[].relationships | object[] | 2つのエンティティ間のリレーションシップ記述子 |
linkedEntities[].relationships[].direction | string | エッジの方向(outgoing または incoming) |
linkedEntities[].relationships[].type | string | リレーションシップタイプ(例: related_to) |
linkedEntities[].relationships[].weight | number | エッジの重み(0〜1) |
agentRuns | object[] | このエンティティにリンクされたエージェント実行 |
agentRuns[].id | string | エージェント実行 ID |
agentRuns[].status | string | 実行ステータス(completed, running, error 等) |
agentRuns[].process | object[] | エージェント実行のプロセスイベント配列 |
agentRuns[].createdAt | string | 実行の作成日時(ISO 8601) |
agentRuns[].updatedAt | string | 実行の更新日時(ISO 8601) |
agentRuns[].agentId | string | この実行を行ったエージェント ID |
agentRuns[].agentName | string | エージェント名 |
agentRuns[].linkedSources | object[] | このエージェント実行で使用されたソース |
agentRuns[].linkedSources[].id | string | ソース ID |
agentRuns[].linkedSources[].url | string | ソース URL |
agentRuns[].linkedSources[].title | string | ソースタイトル |
agentRuns[].linkedSources[].sourceType | string | ソース種別(public または private) |
agentRuns[].linkedEntityIds | string[] | このエージェント実行にリンクされたエンティティ ID |
agentRuns[].linkedEntities | object[] | このエージェント実行にリンクされたエンティティのサマリー |
agentRuns[].linkedEntities[].id | string | エンティティ ID |
agentRuns[].linkedEntities[].label | string | エンティティ名 |
agentRuns[].linkedEntities[].category | string | エンティティカテゴリ |
agentRuns[].linkedEntities[].kind | string | エンティティ種別 |
各エージェント実行の
process フィールドは、プロセスイベントの配列です。イベントタイプとペイロードの完全な一覧は、SSE ストリーミングのドキュメントを参照してください。使用例
curl "https://app.snorbe.deskrex.ai/api/v1/graph/entity/clxxx001" \
-H "Authorization: Bearer snorbe_your_api_key_here"
import requests
resp = requests.get(
"https://app.snorbe.deskrex.ai/api/v1/graph/entity/clxxx001",
headers={"Authorization": "Bearer snorbe_your_api_key_here"},
)
data = resp.json()
if data:
print(f"Entity: {data['label']} ({data['category']})")
print(f"Agent Runs: {len(data['agentRuns'])}")
print(f"Linked Entities: {len(data['linkedEntities'])}")
else:
print("Entity not found")
const resp = await fetch(
"https://app.snorbe.deskrex.ai/api/v1/graph/entity/clxxx001",
{ headers: { Authorization: "Bearer snorbe_your_api_key_here" } },
);
const data = await resp.json();
if (data) {
console.log(`Entity: ${data.label} (${data.category})`);
console.log(`Agent Runs: ${data.agentRuns.length}`);
console.log(`Linked Entities: ${data.linkedEntities.length}`);
}
エラーレスポンス
| HTTP ステータス | 説明 |
|---|---|
| 401 | API キーが無効、期限切れ、または未指定 |
| 404 | エンティティが見つかりません(null ボディを返します) |