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

Authentication (2.0 API)

Concepts

The 2.0 REST API introduces authentication using short-living JWT tokens:

  1. Use your account credentials to get a short-lived token (~1hr)
  2. Perform REST API actions by providing your token as an HTTP header
  3. Periodically refresh your token by exchanging your token for a fresher one, or generating a new one from scratch
  4. Valid tokens can only be exchanged for new ones up to 24 hours: Your application must re-login daily with full credentials

Several convenience methods and language-specific client libraries makes JWT auth even easier to use.

JWT tokens delegate to their holders the full power of an account without exposing passwords. Graphistry does not currently provide token revocation nor fine-grained capability/RBAC for API calls. We therefore recommend creating one or more service accounts, one per independent application.

Authentication

Route Method Headers Parameters Return
api-token-auth/ POST Content-Type: application/json username, password
{"token": str}
Input:

curl -s -X POST \
  -H "Content-Type: application/json" \
  -d '{"username":"my_user","password":"my_pwd"}' \
  http://localhost/api-token-auth/
Output:
{ "user": { "name": "my name", "username": "myusername", "email": "my@email.com", "id": 123 }, "token": "my_generated_token" }
api-token-refresh/ POST Content-Type: application/json username, password
{"token": str}
Input:

curl -s -X POST \
  -H "Content-Type: application/json" \
  -d '{"token":"MY_TOKEN"}' \
  http://localhost/api-token-refresh/
Output:
{"token": "my_generated_token"}
api-token-verify/ POST Content-Type: application/json username, password
{"token": str}
Input:

curl -s -X POST \
  -H "Content-Type: application/json" \
  -d '{"token":"MY_TOKEN"}' \
  http://localhost/api-token-verify/
Output: 200 HTTP status code