Skip to main content

Did API exist on LucidSpark for developers ?

Hi @Michel L 

Yes - LucidSpark provides APIs for developers, enabling them to integrate and interact with the platform.

Specifically, LucidSpark offers two APIs: the REST API and the Extension API, which can be utilized in a similar manner to Lucidchart, allowing for seamless integration and customization.

To learn more please navigate to this help article - Guides (lucid.co)

Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards


Hi @Humas1985 

Thank you for your reply,

So we just need to use lucidspark instead of lucidchart in the product field of the request isn’it?

Regards.


Hi @Michel L  - Yes, that's right.


Hi @Humas1985 

In fact i’m sorry to tell you that you’re wrong.

If you want to get the json content of a lucidspark file using this endpoint:

https://api.lucid.co/documents/{id}/contents

There is an error. 

It seems that the scope for this endpoint does not support lucidspark.

Any suggestions.

Regards.


Hi @Michel L , 

You are correct. At this time, the GET Document Contents endpoint does not support Lucidspark boards.

You can get around this by exporting a Lucidspark board to Lucidchart.

There are two ways to export from Lucidspark to Lucidchart:

  1. ‘Export to Lucidchart’ in the document list menu

     

  2. Use the POST Copy Document endpoint with “product” : “lucidchart” and “template” : “<your Lucidspark document id>”. 

After a board is exported to Lucidchart, you could use GET Document Contents with the new Lucidchart document.

Hope this helps!


Any update on this?  I need to be able to programmatically modify embedded Lucidspark boards. But extensions won’t let me interact with them unless I’ve initiated an action in the extension on the lucid website (not my embedding application). So...I tried switching to APIs instead of extensions, and late in the game just now realized the topic of this thread: no LucidSpark support.  Is there a beta or similar program ?  Please advise how I can get programmatic CRUD on an embedded lucidspark board.


Hi ​@lorienpratt the endpoint 

https://api.lucid.co/documents/{0}/contents

Works now for LucidSpark.


...
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"title": "MyLucidSpark file",
"product": "lucidspark",
"pages": [
{
"id": "0_0",
"title": "Page 1",
...

Regards.


@Michel L great!  Is it documented anywhere?


Also, as far as I can tell, this doesn’t support any lucidspark CRUD, e.g. add a card, right?


@lorienpratt 
https://developer.lucid.co/reference/getdocumentcontent

but you cannot modify the content of the document if it is what you want.

Yo can IFAIK do that only with developing an extension.

So you could : 

  Create an extension

  Open the document using Rest API

  Fire the extension.

Regards.


 


To confirm Michel’s response, there is not currently a way to modify the contents of a document via the Rest API. The extension API can be used for document modification, but that still expects a user interaction on the canvas.

 

We recognize the demand for programmatic modification of a document, but do not support that at this time.