Gudu SQLFlow Product Docs
  • 1. Introduction
    • What is Gudu SQLFlow?
      • What SQLFlow can do
      • Architecture Overview
    • Getting Started
      • Sign up a new account
        • Team Management
        • Delete My Account
        • Activate by entering a coupon
      • How to use SQLFlow
      • Different modes in Gudu SQLFlow
        • Query mode
        • Job mode
      • Basic Usage
      • Convert SQL to E-R Diagram
      • Colors in SQLFlow Diagram
      • Show call relationship
    • Installation
      • Version and Users
        • Cloud and On-Premise version
        • SQLFlow before Version 6
          • For older version SQLFlow under Linux
          • For older version SQLFlow under MacOS
          • For older version SQLFlow under Windows
      • Linux
      • MacOS
      • Windows
      • Docker
      • Clickhouse Installation
        • Clickhouse For CentOs
        • Clickhouse For Ubuntu/Debian/RHEL
      • Troubleshooting
      • Upgrade
      • Third Party Components
      • Renew License File
    • UI
      • SQLText Editor
      • Schema Explorer
      • Diagram Panel
      • Settings
      • Job Management
        • Job Sources
    • Dlineage Tool
      • Overview
      • Usage
        • Analyze data linege from SQL files
        • Analyze data linege from a database
        • Resolve the ambiguous columns in SQL query
        • Map the DataFlowAnalyzer and the settings on SQLFlow UI
        • Settings
      • Dataflow.xml structure
      • FAQ
  • 2. CONCEPTS
    • Data Lineage Basics
      • Dataflow
        • Relations generated by SQLFlow
      • Direct Dataflow
      • Indirect Dataflow
      • Aggregate function and Dataflow
      • Dataflow chain
    • Data Lineage Format Reference
  • 3. API Docs
    • Prerequisites
    • Using the Rest API
    • SQLFlow Rest API reference
      • User Interface
      • Generation Interface
        • /sqlflow
        • /sqlflow/selectedgraph/table_level_lineage
        • /sqlflow/selectedgraph/image
        • /sqlflow/graph
        • /sqlflow/graph/table_level_lineage
        • /sqlflow/graph/image
        • /sqlflow/downstreamGraph
        • /sqlflow/upstreamGraph
        • /sqlflow/erdiagramSelectGraph
        • /sqlflow/leftMostSourceTableGraph
      • Job Interface
        • /submitUserJob
        • /displayUserJobSummary
        • /displayUserJobsSummary
        • /exportLineageAsJson
        • /exportFullLineageAsJson
        • /exportLineageAsGraphml
        • /submitPersistJob
        • /displayUserLatestJobTableLevelLineage
      • Export Image
      • Export CSV
        • /sqlflow/exportFullLineageAsCsv
        • /job/exportFullLineageAsCsv
    • Swagger UI
    • Export the data lineage result
    • Python
      • Basic Usage
      • Advanced Usage
    • SQL Parser API
      • checkSyntax
  • 4. SQLFlow Widget
    • Widget Get started
    • Usages
    • Widget API Reference
  • 5. Databases
    • Database Objects
      • Azure
      • DB2
  • 6. SQLFlow-ingester
    • Introduction
      • SQLFlow-Exporter
      • SQLFlow-Extractor
      • SQLFlow-Submitter
    • Get Started
      • SQL Server
    • SQLFlow-Ingester Java API Usage
    • Understand the format of exported data
      • Oracle
      • Microsoft SQL Server
      • MySQL
      • PostgreSQL
    • List of Supported dbVendors
    • Git Repo
    • Third Party Components
  • 7. Reference
    • Lineage Model
      • Json Format Lineage Model
      • XML Format Lineage Model
      • Data Lineage Elements
    • Database Model
  • 8. other
    • FAQ
      • Handling Internal Database
      • Delete Your Account
      • Table Form Data Without Intermediates
      • Not all schema exported from Oracle
      • Lineage Customization
    • Roadmap
    • SQL Samples
      • Exchange table partition
      • Generate relationship for renamed table
      • Snowflake table function lineage detection
    • Change Logs
    • SQLFlow with Oracle XML functions
    • Major Organizations Utilizing SQLFlow
Powered by GitBook
On this page
  1. 3. API Docs
  2. SQLFlow Rest API reference
  3. Generation Interface

/sqlflow/erdiagramSelectGraph

Previous/sqlflow/upstreamGraphNext/sqlflow/leftMostSourceTableGraph

Last updated 1 year ago

Show the E-R Diagram based on the given source (sqltext/sessionId). Check for more information about this feature in SQLFlow UI.

Retrieve E-R Diagram in Json

/sqlflow/generation/sqlflow/erdiagramSelectGraph

Sample:

curl --location 'https://<SQLFLOW URL>/gspLive_backend/sqlflow/generation/sqlflow/erdiagramSelectGraph' \
--header 'accept: application/json' \
--form 'userId="gudu|0123456789"' \
--form 'sessionId="85b5119f83fcfefa93136e79dc05f2f61efe3b75e6a2b733568e0879c24f0c08_1680615728918"' \
--form 'dbvendor="dbvmssql"' \
--form 'jobId="6def00e8796e4c20ba216826c0ab5b73"' \
--form 'databse="hr"' \
--form 'schema="dbo"'

Retrieve E-R Diagram image

/sqlflow/generation/sqlflow/erdiagramSelectGraph/image

Sample:

curl --location 'https://<SQLFLOW URL>/gspLive_backend/sqlflow/generation/sqlflow/erdiagramSelectGraph/image' \
--header 'accept: image/*' \
--form 'userId="gudu|0123456789"' \
--form 'sessionId="85b5119f83fcfefa93136e79dc05f2f61efe3b75e6a2b733568e0879c24f0c08_1680615728918"' \
--form 'dbvendor="dbvmssql"' \
--form 'jobId="6def00e8796e4c20ba216826c0ab5b73"' \
--form 'databse="hr"' \
--form 'schema="dbo"'
here
  • Retrieve E-R Diagram in Json
  • POSTgenerate ER-Diagram Graph
  • Retrieve E-R Diagram image
  • POSTgenerate ER-Diagram Graph image

generate ER-Diagram Graph

post

generate ER-Diagram Graph

Authorizations
Query parameters
databasestringOptional

database

dbvendorstringOptional

dbvendor

defaultDatabasestringOptional

defaultDatabase

defaultSchemastringOptional

defaultSchema

defaultServerstringOptional

defaultServer

jobIdstringOptional

jobId

normalizeIdentifierbooleanOptional

normalizeIdentifier

Default: true
schemastringOptional

schema

serverstringOptional

server

sessionIdstringOptional

sessionId

sharebooleanOptional

whether generate the sharable URL for the result

Default: false
sqltextstringOptional

sqltext

tablestringOptional

table

tokenstringRequired

token

userIdstringRequired

userId

Body
sqlfilestring · binaryOptional

sqlfile

Responses
200
OK
application/json;charset=utf-8
Responsestring
201
Created
401
Unauthorized
403
Forbidden
404
Not Found
post
POST /api/gspLive_backend/sqlflow/generation/sqlflow/erdiagramSelectGraph HTTP/1.1
Host: api.gudusoft.com
Authorization: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 20

{
  "sqlfile": "binary"
}
text

generate ER-Diagram Graph image

post

generate ER-Diagram Graph image

Authorizations
Query parameters
databasestringOptional

database

dbvendorstringOptional

dbvendor

defaultDatabasestringOptional

defaultDatabase

defaultSchemastringOptional

defaultSchema

defaultServerstringOptional

defaultServer

jobIdstringOptional

jobId

normalizeIdentifierbooleanOptional

normalizeIdentifier

Default: true
schemastringOptional

schema

serverstringOptional

server

sessionIdstringOptional

sessionId

sqltextstringOptional

sqltext

tablestringOptional

table

tokenstringRequired

token

userIdstringRequired

userId

Body
sqlfilestring · binaryOptional

sqlfile

Responses
200
OK
Responsestring · byte
201
Created
401
Unauthorized
403
Forbidden
404
Not Found
post
POST /api/gspLive_backend/sqlflow/generation/sqlflow/erdiagramSelectGraph/image HTTP/1.1
Host: api.gudusoft.com
Authorization: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 20

{
  "sqlfile": "binary"
}
Ynl0ZXM=