Get knowledge Graph
Knowledge Graph
Get knowledge Graph
1️⃣ Overview
Purpose:
Retrieves nodes and relationships from a knowledge graph associated with a specific file.
Supports limiting the number of returned graph entities.
2️⃣ Endpoint
GET /ai/api/v2/knowledge-graph?file_id={file_id}&limit={limit}
3️⃣ Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file_id | string | ✅ Yes | The ID of the file whose knowledge graph is to be fetched |
| limit | number | ❌ No | Maximum number of nodes/relationships to return (default: 100 if not specified) |
4️⃣ Authentication
Requires authentication using:
Authorization: Bearer <token>
5️⃣ Request Headers
| Header | Required |
|---|---|
| Authorization | ✅ Yes |
6️⃣ Example Request
curl --location 'https://ai.datagol.ai/ai/api/v2/knowledge-graph?file_id={file_id}&limit={limit}' \
--header 'Authorization: Bearer <token>'
7️⃣ Behavior Summary
Returns knowledge graph data including nodes and relationships.
Supports pagination-like control using the limit parameter.
Default response size is 100 entities when limit is not provided.
GET
Get knowledge Graph