Headers
Path Parameters
Response
Successful Response
Represents a knowledge graph
import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const graph = await client.graph.retrieve('name');
console.log(graph.id);{
"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>"
}Get a graph by name.
This endpoint retrieves a graph by its name if the user has access to it.
import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const graph = await client.graph.retrieve('name');
console.log(graph.id);{
"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>"
}Successful Response
Represents a knowledge graph
Show child attributes
Show child attributes
Was this page helpful?