REST (or any) API for Draw.io/diagrams.net

1,434 views
Skip to first unread message

Claudia de Luna

unread,
Feb 9, 2021, 10:41:28 AM2/9/21
to diagrams.net Q&A
Hi,  I am looking at tools to help automate the creation of diagrams.  In a perfect world diagrams.net would expose a REST API which would allow one to programmatically 
- initiate a blank sheet
- initiate a layer
- load a set of icons or local custom icons
- programmatically define nodes, edges, labels, type of diagram, and directionality
- save locally as JSON or even DOT
- save locally ad image (SVG, PDF, JPG, VDSX (if zero cost))
- etc..
I don't believe that is possible today but I was wondering:
1. are there any integrations which make this possible?
2. is this anywhere on the road map?

Thank you,

Claudia

David Benson [diagrams.net]

unread,
Feb 9, 2021, 10:43:24 AM2/9/21
to diagrams.net Q&A
How would this work when we don't store the diagrams and we have no authenication?

Claudia de Luna

unread,
Feb 9, 2021, 12:14:14 PM2/9/21
to diagrams.net Q&A
But we can save locally right? So I guess I was thinking the API could expose minimally a "Save As" to local storage.  Otherwise you have to deal with APIs for all the storage options you do support (say Google drive) and you probably don't want to get into that but most do have APIs that allow access to files so would it be easier if the responsibility for authenticating say to dropbox and saving a file (and getting it for updates and/or rendering) falls on the programmer?  And thinking it through a call to load an existing diagram would be needed as well.  

From going through posts Its clear you want to keep the scope clean and crisp and I get that but diagrams.net is so close to my goal of no longer using Visio! :D.  I had to ask!
Reply all
Reply to author
Forward
0 new messages