Create Knowledge Graph
Knowledge Graph
Create Knowledge Graph
1️⃣ Overview
Purpose:
Creates a knowledge graph from a specific file within a workspace.
2️⃣ Endpoint
POST /ai/api/v2/knowledge-graph/create?file_id={file_id}&workspace_id={workspace_id}
3️⃣ Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file_id | string | ✅ Yes | The ID of the file to create the knowledge graph from |
| workspace_id | string | ✅ Yes | Workspace identifier where the knowledge graph will be created |
4️⃣ Authentication
Requires authentication using:
Authorization: Bearer <token>
5️⃣ Request Headers
| Header | Required |
|---|---|
| Authorization | ✅ Yes |
6️⃣ Example Request
curl -X POST "https://kg.datagol.ai/ai/api/v2/knowledge-graph/create?file_id={file_id}&workspace_id={workspace_id}" \
-H "Authorization: Bearer <token>"
7️⃣ Behavior Summary
Creates a knowledge graph by processing the specified file.
Supports semantic graph construction from workspace file content and stores graph metadata for downstream AI processing.
POST
Create Knowledge Graph