Document list

There are two ways a third-party client can access the document list. First, the client can have Lucidchart render the document list as html and provide a callback URL the user should be sent to when they select a document. Second, a client can obtain the document list metadata directly from Lucidchart as XML.

Display the Lucidchart document list (embedded HTML)

This approach to displaying the document list has Lucidchart render the document list as HTML. The client provides Lucidchart with a callback to send the user to when they take an action. For example, the client could have an iframe in which the Lucidchart document list is rendered. The URL is:

https://www.lucidchart.com/documents/external?callback=<URL Encoded callback>

This would prompt the user for login if they do not already have an active session that is in a cookie. OAuth parameters can be sent with the request to avoid the login prompt:

https://www.lucidchart.com/documents/external?callback=<URL Encoded callback>&oauth_signature=<oauth signature>&oauth_version=1.0&oauth_nonce=<nonce>&oauth_signature_method=HMAC-SHA1&oauth_consumer_key=<consumer_key>&oauth_token=<token>&oauth_timestamp=<timestamp>

This will display a page without the Lucidchart "chrome" that includes the users documents list as well as links to create a new document. If the user clicks on an existing document, the user will be redirected to the callback with the document id added as a query parameter. If the user creates a new document, they will be brought to the Lucidchart editor where they can create a document. There will be a button at the top of the editor to return to the client application. For example, suppose the following URL was put in an iframe in a third-party application:

https://www.lucidchart.com/documents/external?callback=http%3A%2F%2Fexample.com%0A

If the user clicked on a document in their document list with document id 1234 (or created a new document with id 12345), they would be directed to:

https://www.example.com?documentId=1234

The query parameter documentId allows the third party to know the document the user selected or created. The client can use the documentId with the "document" api to obtain meta data about the document or the images api to obtain a static image of the document.

Here is a screenshot of an embedded Lucidchart document list in a third-party client. In this case, the Lucidchart document list is being displayed in an iframe of a Confluence page. When the user clicks on a document, the user is redirected to the callback provided in the iframe URL. That callback is to another confluence page which reads the documentId as a query param. The documentId is used to obtain a static image of the document (using the images API) which is attached to the confluence wiki page.

Obtaining the document list directly

If a third party would like to render the document list themselves, they can obtain all the documents and the metadata about the document directly. The signed OAuth headers are required to make this call.

URL

https://www.lucidchart.com/documents/docs

Response

<?xml version="1.0" ?>
<documents>
    <document>
        <documentId>4da321d6-134c-417c-9658-63090ad1862f</documentId>
        <title>test</title>
        <editUrl>https://www.lucidchart.com/documents/edit/4da321d6-134c-417c-9658-63090ad1862f</editUrl>
        <viewUrl>https://www.lucidchart.com/documents/view/4da321d6-134c-417c-9658-63090ad1862f</viewUrl>
        <version>173</version>
        <pageCount>3</pageCount>
    </document>
    <document>
        <documentId>4de6caa6-2380-4ce5-8328-15230a2e3afb</documentId>
        <title>test2</title>
        <editUrl>https://www.lucidchart.com/documents/edit/4de6caa6-2380-4ce5-8328-15230a2e3afb</editUrl>
        <viewUrl>https://www.lucidchart.com/documents/view/4de6caa6-2380-4ce5-8328-15230a2e3afb</viewUrl>
        <version>253</version>
        <pageCount>1</pageCount>
    </document>    
    <document>
        <documentId>4df63d98-59f0-438a-aded-6aa20a2e3afb</documentId>
        <title>My File</title>
        <editUrl>https://www.lucidchart.com/documents/edit/4df63d98-59f0-438a-aded-6aa20a2e3afb</editUrl>
        <viewUrl>https://www.lucidchart.com/documents/view/4df63d98-59f0-438a-aded-6aa20a2e3afb</viewUrl>
        <version>32</version>
        <pageCount>1</pageCount>
    </document>
    <document>
        <documentId>4df67392-0894-44ad-987e-6ab30a2e3afb</documentId>
        <title>Mockup #1</title>
        <editUrl>https://www.lucidchart.com/documents/edit/4df67392-0894-44ad-987e-6ab30a2e3afb</editUrl>
        <viewUrl>https://www.lucidchart.com/documents/view/4df67392-0894-44ad-987e-6ab30a2e3afb</viewUrl>
        <version>221</version>
        <pageCount>1</pageCount>
    </document>
</documents>