Connect to a REST API with a New Extension

Extensions let you generate a diagram from a data source. SmartDraw has a growing number of built-in extensions that let you automatically generate class diagrams, database diagrams, decision trees, organizational charts, and more.

This recent update to SmartDraw now also lets you create an extension that can connect to any REST API to generate a diagram from data.

Type wall angle

How a REST Extension Works

The process for creating any SmartDraw extension is the following:

  1. You need to get data from a source like Jira, ServiceNow, Github, and so on
  2. Create a mental model of what you're trying to visualize: a hierarchy, relationships, a flow, a timeline, and so on
  3. Describe that model using VisualScript markup. VisualScript is a markup language based on JSON used to describe diagrams without coordinates. SmartDraw will build a diagram based on the VisualScript markup passed to it.

The REST Extension allows you to write the code that translates data into VisualScript in the language of your choice, running as a web service on the host of your choice. All you need to do is provide a REST endpoint that returns a string of VisualScript markup to SmartDraw to render as a diagram. The REST Extension configuration dialog lets you use a UI builder to create an end-user UI for input, but the code that generates the VisualScript is hosted elsewhere.

Type wall angle

Creating a New REST Extension

To create a new REST Extension go to the Extensions folder in the SmartDraw Template Dialog and click on the "Create an Extension" icon and choose the REST Extension option from the dialog that pops up. Point the extension to the url of your REST API.

Read the entire REST extension tutorial here.

Set distance to wall opening