Getting Started
API Reference
- GETPing Health
- GETGet Available Models
- POSTRetrieve Chunks
- POSTRetrieve Chunks Grouped
- POSTRetrieve Documents
- POSTBatch Get Documents
- POSTBatch Get Chunks
- POSTQuery Completion
- GETGet Chat History
- GETGet Available Models For Selection
- POSTAgent Query
- GETGet Usage Stats
- GETGet Recent Usage
- POSTGenerate Local Uri
- POSTGenerate Cloud Uri
- DELDelete Cloud App
- GETList Chat Conversations
- PATCHUpdate Chat Title
Documents
Folders
Workflows
model-config
Logs
Graph
Graph
Get Graph
Get a graph by name.
This endpoint retrieves a graph by its name if the user has access to it.
Args: name: Name of the graph to retrieve auth: Authentication context folder_name: Optional folder to scope the operation to end_user_id: Optional end-user ID to scope the operation to
Returns: Graph: The requested graph object
GET
/
graph
/
{name}
JavaScript
Copy
Ask AI
import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const graph = await client.graph.retrieve('name');
console.log(graph.id);
Copy
Ask AI
{
"id": "<string>",
"name": "<string>",
"entities": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"properties": {},
"document_ids": [
"<string>"
],
"chunk_sources": {}
}
],
"relationships": [
{
"id": "<string>",
"source_id": "<string>",
"target_id": "<string>",
"type": "<string>",
"document_ids": [
"<string>"
],
"chunk_sources": {}
}
],
"metadata": {},
"system_metadata": {},
"document_ids": [
"<string>"
],
"filters": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"folder_name": "<string>",
"end_user_id": "<string>",
"app_id": "<string>"
}
Headers
Path Parameters
Response
200
application/json
Successful Response
Represents a knowledge graph
Was this page helpful?
JavaScript
Copy
Ask AI
import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const graph = await client.graph.retrieve('name');
console.log(graph.id);
Copy
Ask AI
{
"id": "<string>",
"name": "<string>",
"entities": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"properties": {},
"document_ids": [
"<string>"
],
"chunk_sources": {}
}
],
"relationships": [
{
"id": "<string>",
"source_id": "<string>",
"target_id": "<string>",
"type": "<string>",
"document_ids": [
"<string>"
],
"chunk_sources": {}
}
],
"metadata": {},
"system_metadata": {},
"document_ids": [
"<string>"
],
"filters": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"folder_name": "<string>",
"end_user_id": "<string>",
"app_id": "<string>"
}
Assistant
Responses are generated using AI and may contain mistakes.