import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const graphs = await client.graph.list();
console.log(graphs);
[
{
"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>"
}
]
List all graphs the user has access to.
This endpoint retrieves all graphs the user has access to.
Args: 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: List[Graph]: List of graph objects
import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const graphs = await client.graph.list();
console.log(graphs);
[
{
"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
The response is of type Graph · object[]
.
Was this page helpful?