UI Guides


Graphistry Setup


REST APIs

Introduction

2.0 REST API Tutorial (cURL)


URL API to Embed & Control

- HTML

- URL Options

- IFrame CSS Style Tips


Authentication (2.0 API)

- Concepts

- Create token

- Refresh token

- Verify token

- Modes: Password, Personal Key, & SSO


Computation

- GFQL Query Endpoint

    - GFQL Operations

    - GFQL Predicates

- Python Query Endpoint

- GFQL UDF Endpoint

- Python UDF Endpoint


Upload Data (2.0 API)

- Concepts

- List Files

- Create File

- Delete File

- Upload File Data

- List Visualization Datasets

- Create Visualization Dataset with Bindings

    - Hypergraphs

- Delete Visualization

- Schema

Basic Bindings

    - Color

    - Color Palettes

    - Edge Weight Bindings

Complex Bindings

    - Colors and Sizes

    - Icons

    - Badges

    - Radial & Horizontal Axis

    - Field Controls Overview

        - Field Inclusion

        - Field Exclusion

        - Computed Fields

- Branding Metadata: Logos, title, backgrounds, & effects

- Upload Node & Edge Data

   - json

   - csv

   - parquet

   - orc

   - arrow


Live Sessions (experimental)

- View


Health Checks


Python Notebooks & API

- PyGraphistry Homepage (GitHub)

- PyGraphistry API (ReadTheDocs)

- Jupyter Notebook Examples (GitHub)

- Pygraphistry Databricks Examples (GitHub)

- Graph Algorithms


Visual Playbooks

- Connectors

- Pivots

- Templates


JavaScript Libraries

- React - Storybook

- React - API

- Browser JS - Storybook

- Browser JS - Example

- Browser JS - API

- Node.js - API

API Schema: Supported Graph Operations

Introduction

The API schema offers an insight into the computational and layout capabilities available within our system. By fetching this schema, users can ascertain which graph algorithms and layouts are supported, aiding in the creation of tailored and complex visualizations.

Fetching the API Schema

Endpoint: /api/v1/datasets/

Method: GET

Description: Retrieve the API schema detailing compute and layout functions available in cugraph and igraph graph libraries.

Example Request

GET /web/api/v1/datasets/

Example Response

{
    "compute": {
        "cugraph": [
            "betweenness_centrality",
                "katz_centrality",
                "ecg",
                "leiden",
                "louvain",
                "spectralBalancedCutClustering",
                "spectralModularityMaximizationClustering",
                "connected_components",
                "strongly_connected_components",
                "weakly_connected_components",
                "core_number",
                "hits",
                "pagerank",
                "bfs",
                "bfs_edges",
                "sssp",
                "shortest_path",
                "shortest_path_length",
                "batched_ego_graphs",
                "edge_betweenness_centrality",
                "jaccard",
                "jaccard_w",
                "overlap",
                "overlap_coefficient",
                "overlap_w",
                "sorensen",
                "sorensen_coefficient",
                "sorensen_w",
                "ego_graph",
                "k_core",
                "minimum_spanning_tree"
            ],
            "igraph": ["authority_score",
                "betweenness",
                "bibcoupling",
                "harmonic_centrality",
                "closeness",
                "clusters",
                "cocitation",
                "community_edge_betweenness",
                "community_fastgreedy",
                "community_infomap",
                "community_label_propagation",
                "community_leading_eigenvector",
                "community_leiden",
                "community_multilevel",
                "community_spinglass",
                "community_walktrap",
                "constraint",
                "gomory_hu_tree",
                "hub_score",
                "eccentricity",
                "eigenvector_centrality",
                "k_core",
                "pagerank",
                "spanning_tree"
            ]
        },
    "layout": {
        "cugraph": [
            "force_atlas2"
        ],
        "igraph": [
            "auto",
            "automatic",
            "bipartite",
            "circle",
            "circular",
            "dh",
            "davidson_harel",
            "drl",
            "drl_3d",
            "fr",
            "fruchterman_reingold",
            "fr_3d",
            "fr3d",
            "fruchterman_reingold_3d",
            "grid",
            "grid_3d",
            "graphopt",
            "kk",
            "kamada_kawai",
            "kk_3d",
            "kk3d",
            "kamada_kawai_3d",
            "lgl",
            "large",
            "large_graph",
            "mds",
            "random",
            "random_3d",
            "rt",
            "tree",
            "reingold_tilford",
            "rt_circular",
            "reingold_tilford_circular",
            "sphere",
            "spherical",
            "circle_3d",
            "circular_3d",
            "star",
            "sugiyama"
        ]
    },
},
    "types": {
        "CuGraphKind": [
            "Graph",
            "MultiGraph",
            "BiPartiteGraph"
        ]
    }

Understanding the Schema

The schema is structured into three main components:

  1. Compute: Lists the graph algorithms supported by the cugraph and igraph graph libraries.
  2. Layout: Describes the various graph layout methods available for visual presentation.
  3. Types: Outlines the types or kinds of graphs that can be handled, such as Graph, MultiGraph, or BiPartiteGraph.

Remote Examples

Using igraph with PageRank Algorithm:

curl -X POST "http://nexus:8000/api/v1/datasets/" \
     -H "Authorization: " \
     -H "Content-Type: application/json" \
     -d '{
         "agent_name": "test_agent",
         "description": "Test dataset using igraph with pagerank",
         "edge_encodings": "sample_edge_encodings",
         "metadata": "sample_metadata",
         "node_encodings": "sample_node_encodings",
         "compute": {
             "pagerank": {
                 "libraries": ["igraph"],
                 "alg": "pagerank"
             }
         },
         "name": "Test Dataset 1",
         "org_name": "sample_org"
     }'

Using cugraph with Community Detection Algorithm:

curl -X POST "http://nexus:8000/api/v1/datasets/" \
     -H "Authorization: " \
     -H "Content-Type: application/json" \
     -d '{
         "agent_name": "test_agent",
         "description": "Test dataset using cugraph with community detection",
         "edge_encodings": "sample_edge_encodings",
         "metadata": "sample_metadata",
         "node_encodings": "sample_node_encodings",
         "compute": {
             "community": {
                 "libraries": ["cugraph"],
                 "alg": "louvain"
             }
         },
         "name": "Test Dataset 2",
         "org_name": "sample_org"
     }'