Skip to main content

I have signed up for a 7-day Free Trial of the ‘Teams’ level of subscription and want to create some templates in bulk via the API before my company sorts out it licensing. I have followed some guides and managed to create an API Key, but it is not working when I try to test it via Google Colab. I’ve tried it several times now and wonder if it is just not going to work while I’m on the ‘Free’ trial status?

Hi ​@tony.cox.gboutdoorfires.co.uk!

Yes, both Team and Enterprise subscriptions, including trial accounts, have access to our APIs.

Since you were able to generate an API key, your Developer Portal access is set up correctly. Let’s troubleshoot the specific request you are making. Which endpoint are you trying to reach, and what error message are you receiving?


Thanks ​@Richard U I am a bit new to ‘hands on’ work with APIs to be honest. I think it is the REST API I’m after:

 

“Lucid offers three sets of APIs:

  • Lucid's REST API allows developers to programmatically interact with ( create, search, read contents of, trash, etc.) documents and folders.”

What I am to do is simply iterate through a table (Excel / Google Sheet) containing “basic” data (i.e. NOT detailed and convoluted flow, sequence, etc.), so for instance...to create a ‘placeholder’ of a BPMN Process Flow with a specific header; legend; 2 or 3 ‘blank’ pools/lanes. So, when it was finished, I would have the ‘shell’ of a process which I could then build out without having to copy/paste/save as…

 

Some LLM has been kind enough to manage my expectations a bit:

 

As of today, Lucidchart does not provide a direct REST API endpoint to create diagrams in bulk, meaning you cannot directly generate multiple complex diagrams with pre-defined shapes and connections through a single API call; the closest option would be to use the API to create new documents and then populate them with data using a custom script or extension, effectively simulating bulk creation by iterating through your data and making individual API requests to add shapes and connections to each new document. 

Key points about Lucidchart bulk diagram creation with the API:

  • No dedicated bulk creation endpoint:

    The current API lacks a functionality to create multiple diagrams with pre-defined structures in one go. 

  • Workarounds with existing API functions:

    • Create new documents: You can use the API to create new blank documents and then progressively add shapes and connections to them using individual API calls for each element. 
    • Copy existing diagrams: If you have a template diagram, you can use the API to copy it multiple times and then modify the copied documents with specific data through individual API calls. 
    • Custom scripting/extensions: For more advanced bulk creation, you might need to develop custom scripts or Lucidchart extensions to manage the process of populating multiple documents with data from your source. 

Important considerations:

  • API limitations:

    Be aware of potential limitations like rate limits when making multiple API calls to create diagrams in bulk. 

  • Data preparation:

    Ensure your data is formatted appropriately to be easily translated into shapes and connections within your Lucidchart diagrams. 

 


What I failed to do above was quantify the effort a bit. I’m talking about 50-60 processes which need their own document. So, I was just looking for some time-savers in the grunt work, so I could focus on the meaningful content.


Hi ​@tony.cox.gboutdoorfires.co.uk , I think I understand what you’re asking! While our REST API does support JSON import, your use case (creating 50+ structured BPMN process flows) you might find better efficiency with:

Let me know if you have any questions!


Reply