Lucid's REST API allows developers to gain access to document, user or dynamic data information with a user's permission.
A wiki package could gain access to live-updated images of documents to include in its pages. Or a Facebook app could make it easy for a Lucid user to quickly invite a group of Facebook friends to join a document as a collaborator.
Explore below to see a wide variety of APIs that are available and details for how they work.
You can find example REST API applications in Lucid's repository of Sample Lucid REST Applications.
In order to use any of the Lucid REST APIs, an app must have permission from the user to access their data. This permission can be granted with an OAuth2 access token. Details of the OAuth 2.0 authorization process can be found at https://oauth.net/2/.
To set up an app to use OAuth 2.0, perform the following steps:
As a service, Lucid provides a redirect URI that can be used to allow the user to copy the authorization code to the clipboard.
To use it, register the redirect URI:
When this redirect URI is used and a user grants access to the app, Lucid will redirect the user to a page on our site where they can view and copy the authorization code.
The token creation flow is equivalent for users and accounts, except for the authorization url. Users will also see slightly different descriptions on the consent screen for the requested scopes based on whether permission is being granted for a user token or an account token.
Most use cases are built using user tokens. If you're unsure about which is right for you, see Access Token Types and review what is required for the OAuth 2.0 endpoints you intend to use.
https://lucid.app/oauth2/authorize
?client_id=rd0q2geEEHcDvZNpYmYAXBH5eCHYD8x0sCwVyncf
&redirect_uri=https://lucid.app/oauth2/clients/rd0q2geEEHcDvZNpYmYAXBH5eCHYD8x0sCwVyncf/redirect
&scope=lucidchart.document.content%20offline_access%20user.profile
https://lucid.app/oauth2/clients/rd0q2geEEHcDvZNpYmYAXBH5eCHYD8x0sCwVyncf/redirect
?code=vtpL4oKCv3LSJ8C78FohTYN9uJUUkkZ4mQDYBucl094r
curl 'https://api.lucid.co/oauth2/token' \
--request 'POST' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "vtpL4oKCv3LSJ8C78FohTYN9uJUUkkZ4mQDYBucl094r",
"client_id": "rd0q2geEEHcDvZNpYmYAXBH5eCHYD8x0sCwVyncf",
"client_secret": "x678fc0SyuAbyleYq8MMtpxZMD7y4WFpPuf5a",
"grant_type": "authorization_code",
"redirect_uri": "https://lucid.app/oauth2/clients/rd0q2geEEHcDvZNpYmYAXBH5eCHYD8x0sCwVyncf/redirect"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "oauth2-N2QyNWE3NmViMTg4NzAyMTM5ODYzNDAzZWE5NGVhNzQ0OGUzZTc2N...",
"refresh_token": "oauth2-ZjU3OGVmMmVmZTEzMDI1OWU4M2M2MTI4ZjY2OWEwZDdhODE3NWVjZ...",
"user_id": 1268,
"client_id": "rd0q2geEEHcDvZNpYmYAXBH5eCHYD8x0sCwVyncf",
"expires_in": 3600,
"expires": 1633107891024,
"scopes":[
"lucidchart.document.app",
"offline_access"
],
"token_type": "bearer"
}
When a user wants to allow an app to connect to their Lucid account, use the following flow:
Parameter | Description |
---|---|
|
|
|
|
|
|
|
|
curl 'https://api.lucid.co/users/me/profile' \
--request 'GET' \
--header 'Authorization: Bearer oauth2-Yzh4Y2Q3ZTVhY2FjYjkwOGJlZGNjNjU5NDM2NjgzZmUwMmNmMjkzM...' \
--header 'Lucid-Api-Version: 1'
With the access token, an app can make requests to Lucid APIs and get access to the user's data. To make an authenticated request, include an
Include a
Ensure the token has the correct token type and scope for the endpoint it is being used for. For example, the
curl 'https://api.lucid.co/oauth2/token' \
--request 'POST' \
--header 'Content-Type: application/json' \
--data-raw '{
"refresh_token": "oauth2-Yzh4Y2Q3ZTVhY2FjYjkwOGJlZGNjNjU5NDM2NjgzZmUwMmNmMjkzM...",
"client_id": "30VYbvlkqZv-SmJd7fTdpH9B9et2yqZA6Wvi5NY_",
"client_secret": "D-SkY5dE9m7hQApMwc9DV0iCzSRVV62MnRvG6KKOZt4vNpcw8mTVxM8T9x7qpV72xLEiw",
"grant_type": "refresh_token"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "oauth2-N2QyNWE3NmViMTg4NzAyMTM5ODYzNDAzZWE5NGVhNzQ0OGUzZTc2N...",
"refresh_token": "oauth2-ZjU3OGVmMmVmZTEzMDI1OWU4M2M2MTI4ZjY2OWEwZDdhODE3NWVjZ...",
"user_id": 1268,
"client_id": "f90xoma5O5memgLzA_KWToMWiwBq8kHbYdhSQoxK",
"expires_in": 3600,
"expires": 1633107891024,
"scopes":[
"lucidchart.document.app",
"offline_access"
],
"token_type": "bearer"
}
All access tokens have a brief usable lifetime (currently one hour), after which they expire. To continue accessing that user's data, the app should obtain a new access token using the refresh token that was issued alongside the previously issued access token. This refresh must be performed before the refresh token's expiration (currently 180 days). To refresh a token, make a POST request to
The response will match the format of the OAuth2 token response and contain another refresh token. This new refresh token can itself be refreshed, meaning that once a user authorizes a token with the offline_access scope, the application housing the tokens can access the user's authorized resources for an indefinite period of time. As refreshing a token does not require the user to open a browser, this indefinite access can be maintained completely programmatically (i.e. without further user intervention).
However, if it is not used, a refresh token will expire 180 days after it was created. If the refresh token expires in this way, the application will have to request access from the user again.
Refreshing a token invalidates the old access and refresh tokens. Be sure the app stores the new tokens returned in the response.
#!python
import json
import requests
import os
from datetime import datetime, timedelta
# using local file to store refresh_token
FILE_NAME = './token_info.json'
# oauth2 client information
CLIENT_ID = '30VYbvlkqZv-SmJd7fTdpH9B9et2yqZA6Wvi5NY_'
CLIENT_SECRET = 'D-SkY5dE9m7hQApMwc9DV0iCzSRVV62MnRvG6KKOZt4vNpcw8mTVxM8T9x7qpV72xLEiw'
# initial refresh token generated manually
INITIAL_REFRESH_TOKEN = 'oauth2-fzLTc4MjRiNGY5ZGI4MjlmZWNlZjI5OG...'
# 1) Return our current token, or generate a new one if its expired.
# If this is the first execution, use a manually generated token to get started
def retrieve_access_token():
if (os.path.exists(FILE_NAME)):
return retrieve_token_info(None)
else:
return retrieve_token_info(INITIAL_REFRESH_TOKEN)
# 2) Retrieve the current token and refresh if its about to expire
def retrieve_token_info(grantedToken):
if (grantedToken is not None):
return refresh_token(grantedToken)
else:
with open(FILE_NAME, 'r') as fileHandle:
data = json.loads(fileHandle.read())
if datetime.fromisoformat(data['expiration']) > datetime.now()- timedelta(minutes=5):
return data['access_token']
return refresh_token(data['refresh_token'])
# 3) Refresh my token and save for future use
def refresh_token(refresh_token):
url = 'https://api.lucid.co/oauth2/token'
body = {
'client_id': CLIENT_ID,
'client_secret': CLIENT_SECRET,
'grant_type':'refresh_token',
'refresh_token': refresh_token
}
request = requests.post(url, json = body)
response = json.loads(request.content)
save_token_info(response)
return response['access_token']
# 4) Set the expiration and save the token for next time
def save_token_info(token):
expiration = datetime.now() + timedelta(seconds=token.get('expires_in'))
token['expiration'] = expiration.isoformat()
with open(FILE_NAME, 'w') as fileHandle:
fileHandle.write(json.dumps(token))
# get my current or refreshed access_token
access_token = retrieve_access_token()
print(access_token)
To assist with the development of your Lucid integration, we have provided an example python script that illustrates the typical refresh token flow. It stores the
All endpoints (unless otherwise specified) require two specific headers:
Endpoints require a valid OAuth2 token to be included in the Authorization header.
The version corresponds to the version of the resource being accessed. Resources are classified as documents, users, datasets, etc. Each individual resource section will state the currently supported versions.
Access tokens can be created on behalf of a user or on behalf of an account.
User tokens enable actions to be performed on behalf of the user that authorized their creation. If enabled, any user can authorize your app to create a user token on their behalf. With the proper scopes, a request authorized with a user token can do anything that user could do on their own behalf (e.g. create documents, edit documents, etc.).
Account tokens enable actions to be performed on behalf of an entire account. Only admins on an account can authorize your app to create a token on behalf of the account. Unless specifically intended, admins can't create tokens with scopes that can do things that they themselves can't do. Once created, the token is no longer associated with the user that created it. Anyone who has access to the token can use your app perform the administrative actions allowed by the scopes on the token, whether or not they would be able to do such actions without the token.
If you want your app to be able to perform any administrative actions (manage users, etc.), you'll need to use account tokens. User tokens can't be used to perform actions like managing users on an account, even if the user the token represents is an admin with permission to manage users. To perform such actions, an account token must be created. For this reason, not all scopes are valid for all token types; some scopes are only valid for user tokens, and some are only valid for account tokens.
Access scopes are used to limit the permissions of an issued token. When requesting a token, the client includes a list of what actions it wants permission to perform by including the appropriate scopes. Each API includes a list of which scopes allow that action to be performed.
Some scopes contain children to provide additional access granularity. If the parent scope is given, all children permissions are included. For example, requesting
Additional details about Oauth 2.0 scopes can be found at https://oauth.net/2/scope
Account token only scopes are tagged with
User token only scopes are tagged with
Scope | Description shown to users on the consent screen |
---|---|
|
View basic information about your account (e.g., account ID and account name) . |
|
Create, view, edit, and delete users on your account. |
|
View users on your account. |
|
Transfer ownership of a user's resources to another user on your account. |
|
Create, view, edit, share, and delete your folders. Organize your folders and their contents. |
|
View any of your folders and list their contents. |
|
Accept document and folder share links. |
|
View, edit, and manage any Lucidchart document selected for this third-party application. Create, view, edit, and manage any Lucidchart document within its app-specific folder. |
|
Create, view, edit, and manage any Lucidchart document within its app-specific folder. |
|
View, edit, and manage any Lucidchart document selected for this third-party application. |
|
View and download any Lucidchart document selected for this third-party application. |
|
Create, view, edit, and delete collaborators and invitations of any Lucidchart document on your team or enterprise account selected for the third-party application. |
|
View collaborators and invitations of any Lucidchart document on your team or enterprise account selected for the third-party application. |
|
Create, view, edit, and delete embeds of any Lucidchart document on your team or enterprise account selected for the third-party application. |
|
Create, view, edit, and delete the third party application's share links of any Lucidchart document on your team or enterprise account selected for the third-party application. |
|
View the third party application's share links of any Lucidchart document on your team or enterprise account selected for the third-party application. |
|
Create, view, edit, and delete any Lucidchart document on your account. |
|
View and download any Lucidchart document on your account. |
|
Create, view, edit, and delete collaborators and invitations for any of your Lucidchart documents on your team or enterprise account. |
|
View collaborators and invitations for any of your Lucidchart documents on your team or enterprise account. |
|
Create, view, edit, and delete embeds for any of your Lucidchart documents on your team or enterprise account. |
|
Create, view, edit, and delete the third party application's share links for any of your Lucidchart documents on your team or enterprise account. |
|
View the third party application's share links for any of your Lucidchart documents on your team or enterprise account. |
|
View, edit, and manage any Lucidscale model selected for this third-party application. Create, view, edit, and manage any Lucidscale model within its app-specific folder. |
|
Create, view, edit, and manage any Lucidscale model within its app-specific folder. |
|
View, edit, and manage any Lucidscale model selected for this third-party application. |
|
View and download any Lucidscale model selected for this third-party application. |
|
Create, view, edit, and delete collaborators and invitations of any Lucidscale model on your team or enterprise account selected for the third-party application. |
|
View collaborators and invitations of any Lucidscale model on your team or enterprise account selected for the third-party application. |
|
Create, view, edit, and delete embeds of any Lucidscale model on your team or enterprise account selected for the third-party application. |
|
Create, view, edit, and delete the third party application's share links of any Lucidscale model on your team or enterprise account selected for the third-party application. |
|
View the third party application's share links of any Lucidscale model on your team or enterprise account selected for the third-party application. |
|
Create, view, edit, and delete any Lucidscale model on your account. |
|
View and download any Lucidscale model on your account. |
|
Create, view, edit, and delete collaborators and invitations for any of your Lucidscale models on your team or enterprise account. |
|
View collaborators and invitations for any of your Lucidscale models on your team or enterprise account. |
|
Create, view, edit, and delete embeds for any of your Lucidscale models on your team or enterprise account. |
|
Create, view, edit, and delete the third party application's share links for any of your Lucidscale models on your team or enterprise account. |
|
View the third party application's share links for any of your Lucidscale models on your team or enterprise account. |
|
View, edit, and manage any Lucidspark board selected for this third-party application. Create, view, edit, and manage any Lucidspark board within its app-specific folder. |
|
Create, view, edit, and manage any Lucidspark board within its app-specific folder. |
|
View, edit, and manage any Lucidspark board selected for this third-party application. |
|
View and download any Lucidspark board selected for this third-party application. |
|
Create, view, edit, and delete collaborators and invitations of any Lucidspark board on your team or enterprise account selected for the third-party application. |
|
View collaborators and invitations of any Lucidspark board on your team or enterprise account selected for the third-party application. |
|
Create, view, edit, and delete embeds of any Lucidspark board on your team or enterprise account selected for the third-party application. |
|
Create, view, edit, and delete the third party application's share links of any Lucidspark board on your team or enterprise account selected for the third-party application. |
|
View the third party application's share links of any Lucidspark board on your team or enterprise account selected for the third-party application. |
|
Create, view, edit, and delete any Lucidspark board on your account. |
|
View and download any Lucidspark board on your account. |
|
Create, view, edit, and delete collaborators and invitations for any of your Lucidspark boards on your team or enterprise account. |
|
View collaborators and invitations for any of your Lucidspark boards on your team or enterprise account. |
|
Create, view, edit, and delete embeds for any of your Lucidspark boards on your team or enterprise account. |
|
Create, view, edit, and delete the third party application's share links for any of your Lucidspark boards on your team or enterprise account. |
|
View the third party application's share links for any of your Lucidspark boards on your team or enterprise account. |
|
Continue to perform authorized actions when you’re not logged in (required to refresh tokens). |
|
Allow applications to view basic information about you (e.g., full name, username, and email). |
Deprecated Scope | Description shown to users on the consent screen |
---|---|
|
View, edit, and manage any Lucidchart document selected for this third-party application. Create, view, edit, and manage any Lucidchart document within its app-specific folder. |
|
Create, view, edit, and manage any Lucidchart document within its app-specific folder. |
|
View, edit, and manage any Lucidchart document selected for this third-party application. |
|
View and download any Lucidchart document selected for this third-party application. |
|
Create, view, edit, and delete any Lucidchart document on your account. |
|
View and download any Lucidchart document on your account. |
When accessing Lucid APIs using OAuth 2.0, the following limitations apply:
If the app is not published, only specified app collaborators can use the app with your client ID and secret. If you would like to develop an app that all Lucid users can use, refer to this publishing documentation.
Authorization must happen in the browser, because a user must give consent for the client to access their information. For this reason, the authorization request cannot be made from most http clients.
For general information regarding errors that may be returned when requesting access from a user or creating a token, see sections 4.1.2.1 and 5.2 of RFC6749. The following table contains information specific to Lucid's APIs:
Error Code | Possible Causes |
---|---|
|
An admin on the Lucid account may have disabled access to your OAuth2 client. |
|
The provided scopes may not be valid for the requested token type. |
Users in the FedRAMP environment will use different routes for accessing the REST API. Please see below for details
A token that can be used to make authenticated API calls to Lucid APIs.
{
"access_token": "oauth2-Yzh4Y2Q3ZTVhY2FjYjkwOGJlZGNjNjU5NDM2NjgzZmUwMmNmMjkzM...",
"user_id": 341,
"client_id": "30VYbvlkqZv-SmJd7fTdpH9B9et2yqZA6Wvi5NY_",
"expires_in": 3600,
"expires": 1605732868411,
"scopes": ["lucidchart.document.app", "offline_access"],
"token_type": "bearer",
"refresh_token": "oauth2-AVU=-yPcwtzLkusIEnT7D9slQH4g8Ur0MdpUmpT0Z6BSMf6lmesRpTTSBGNniKd"
}
Property | Description |
---|---|
|
String Token to be used when making requests with OAuth 2.0 authentication |
|
String The client ID |
|
Number The lifetime in seconds of the access token |
|
Timestamp Time until this token expires (expressed in milliseconds since Unix epoch) |
|
If the token includes the scope |
|
Array[String] Scopes allowed on this token |
|
String Value is always "bearer" |
|
Number ID of the user this token is on behalf of |
Information about an OAuth2 token.
{
"active": true,
"user_id": 1001,
"client_id": "30VYbvlkqZv-SmJd7fTdpH9B9et2yqZA6Wvi5NY_",
"token_type": "bearer",
"scope": "document.app offline_access",
"expires_in": 3500,
"expires": 1605732868411
}
Property | Description |
---|---|
|
Boolean A boolean value indicating whether or not the token is active |
|
String The client ID |
|
Number The remaining lifetime in seconds of the access token |
|
Timestamp Timestamp for when this token expires (expressed in milliseconds since Unix epoch) |
|
String Space-separated list of scopes allowed on this token |
|
String The type of token returned (currently, always "bearer") |
|
Number ID of the user this token is on behalf of |
curl 'https://api.lucid.co/oauth2/token' \
--request 'POST' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "vtpL4oKCv3LSJ8C78FohTYN9uJUUkkZ4mQDYBucl094r",
"client_id": "f90xoma5O5memgLzA_KWToMWiwBq8kHbYdhSQoxK",
"client_secret": "x678fc0SyuAbyleYq8MMtpxZMD7y4WFpPuf5a",
"grant_type": "authorization_code",
"redirect_uri": "https://lucid.app/oauth2/clients/f90xoma5O5memgLzA_KWToMWiwBq8kHbYdhSQoxK/redirect"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "oauth2-N2QyNWE3NmViMTg4NzAyMTM5ODYzNDAzZWE5NGVhNzQ0OGUzZTc2N...",
"refresh_token": "oauth2-ZjU3OGVmMmVmZTEzMDI1OWU4M2M2MTI4ZjY2OWEwZDdhODE3NWVjZ...",
"user_id": 1268,
"client_id": "f90xoma5O5memgLzA_KWToMWiwBq8kHbYdhSQoxK",
"expires_in": 3469,
"expires": 1633107891024,
"scopes":[
"lucidchart.document.app",
"offline_access"
],
"token_type": "bearer"
}
Access tokens allow a user or account to give an app permissions to make API requests on their behalf. See Access Token Types for more information.
|
The client ID |
|
The client secret |
|
The authorization code |
|
Value is always "authorization_code" |
|
The redirect URI used to get the authorization code |
|
|
|
if the client credentials are invalid. |
curl 'https://api.lucid.co/oauth2/token' \
--request 'POST' \
--header 'Content-Type: application/json' \
--data-raw '{
"refresh_token": "oauth2-Yzh4Y2Q3ZTVhY2FjYjkwOGJlZGNjNjU5NDM2NjgzZmUwMmNmMjkzM...",
"client_id": "30VYbvlkqZv-SmJd7fTdpH9B9et2yqZA6Wvi5NY_",
"client_secret": "D-SkY5dE9m7hQApMwc9DV0iCzSRVV62MnRvG6KKOZt4vNp...",
"grant_type": "refresh_token"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "oauth2-N2QyNWE3NmViMTg4NzAyMTM5ODYzNDAzZWE5NGVhNzQ0OGUzZTc2N...",
"refresh_token": "oauth2-ZjU3OGVmMmVmZTEzMDI1OWU4M2M2MTI4ZjY2OWEwZDdhODE3NWVjZ...",
"user_id": 1268,
"client_id": "30VYbvlkqZv-SmJd7fTdpH9B9et2yqZA6Wvi5NY_",
"expires_in": 3600,
"expires": 1633107891024,
"scopes":[
"lucidchart.document.app",
"offline_access"
],
"token_type": "bearer"
}
Generate a new access token using the refresh token issued at authentication. See refreshing access tokens for more information about using refresh tokens.
|
The client ID |
|
The client secret |
|
Value is always "refresh_token" |
|
The current refresh token |
|
with the new access token and refresh token, as specified in OAuth2 token |
|
if the client credentials are invalid. |
curl 'https://api.lucid.co/oauth2/token/introspect' \
--request 'POST' \
--data 'token=oauth2-N2QyNWE3NmViMTg4NzAyMTM5ODYzNDAzZWE5NGVhNzQ0OGUzZTc2N...' \
--data 'client_id=30VYbvlkqZv-SmJd7fTdpH9B9et2yqZA6Wvi5NY_' \
--data 'client_secret=x678fc0SyuAbyleYq8MMtpxZMD7y4WFpPuf5a'
HTTP/1.1 200 OK
Content-Type: application/json
{
"active": true,
"user_id": 1001,
"client_id": "30VYbvlkqZv-SmJd7fTdpH9B9et2yqZA6Wvi5NY_",
"token_type": "bearer",
"scope": "document.app offline_access",
"expires_in": 3342,
"expires": 1605732868411
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"active": false
}
Retrieves information about the specified access or refresh token.
|
The client ID |
|
The client secret |
|
The token to inspect |
|
with information about the token, as specified in OAuth2 Introspect Token |
|
if the client credentials are invalid. |
curl 'https://api.lucid.co/oauth2/token/revoke' \
--request 'POST' \
--data 'token=oauth2-N2QyNWE3NmViMTg4NzAyMTM5ODYzNDAzZWE5NGVhNzQ0OGUzZTc2N...' \
--data 'client_id=30VYbvlkqZv-SmJd7fTdpH9B9et2yqZA6Wvi5NY_' \
--data 'client_secret=x678fc0SyuAbyleYq8MMtpxZMD7y4WFpPuf5a'
HTTP/1.1 200 OK
Content-Length: 0
Revokes the specified access or refresh token, preventing the token from being used. Regardless of which is revoked, all tokens from that authorization grant will be invalid.
|
The client ID |
|
The client secret |
|
The token to revoke |
|
if the client credentials are valid. |
|
if the client credentials are invalid. |
Type | Example | Description |
---|---|---|
Boolean |
|
An RFC7159 JSON boolean value. |
String |
|
An RFC7159 JSON string value. |
Number |
|
An RFC7159 JSON number value. |
Integer |
|
An integer value formatted as an RFC7159 JSON number value. |
Decimal |
|
A decimal value formatted as an RFC7159 JSON number value. |
DateTime |
|
The date formatted as an RFC3339 timestamp string in the UTC time zone. |
Timestamp |
|
Number of milliseconds since the Unix epoch (January 1, 1970 in the UTC timezone). |
UUID |
|
A universally unique identifier (UUID) in the canonical textual representation format. |
URI |
|
A uniform resource identifier (URI) as defined in RFC3986. |
Array |
|
An array of values of other primitive types. |
Map |
|
A JSON object as defined in RFC7159. |
Product |
|
See Products below. |
The Lucid suite contains multiple products and many APIs accept a Product parameter to dictate which to execute against. The valid Products are:
Lucid APIs use standard HTTP codes to indicate the result of the request.
HTTP Status | Description |
---|---|
|
The request completed successfully. |
|
The request succeeded and the resource was created. |
|
Completed successfully, but returned no response body. Often used with DELETE endpoints. |
{
"code": "unknownOperation",
"message": "The requested operation is unrecognized or not supported for this resource"
}
{
"code": "invalidExportType",
"message": "The requested export type is not supported",
"details": {
"requested": "application/json",
"supported": ["image/jpeg", "image/png"]
},
"requestId": "47CA40AE3BD1A335"
}
HTTP Status | Error Code | Description |
---|---|---|
|
unknownOperation | The requested operation is unrecognized or not supported for this resource |
|
badRequest | Bad or malformed request |
|
unauthorized | The request token is missing, expired or invalid |
|
accessForbidden | Access to this resource is forbidden |
|
notFound | Resource not found |
|
invalidExportType | The requested export type is not supported |
|
alreadyExists | Entity already exists |
|
invalidImportType | Importing the provided file type is not supported |
|
tooManyRequests | The requests received have exceeded the allowed rate limit |
|
internalServerError | An unknown error occurred |
|
The service is down for maintenance |
curl 'https://api.lucid.co/users?pageSize=20&pageToken=eyJvIjoiMSIsImUiOj' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
Link: <https://api.lucid.co/users?pageSize=20&pageToken=eyJvIjoiMSIsImUiOjE2Mjg2OTc3OTF9>; rel="next"
Some API endpoints may return a large number of records in response to a query. To make handling large payloads scalable, Lucid's API uses pagination to limit the number of records returned in a response.
Every paginated endpoint takes two optional query parameters:
The
The
Responses by paginated endpoints contain a URI in the
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 3600
{
"code": "tooManyRequests",
"message": "You have sent too many requests in a given amount of time."
}
To protect the stability of the platform and prevent undue stress on the system, the Lucid API has a rate limiting feature (sometimes called throttling) that restricts requests when the load exceeds a configured amount.
When the number of requests received within a period of time exceeds the allowed threshold, all API requests will respond with
The rate limits are configured high enough that they should never be hit under reasonable normal usage. However, an integration should be built to handle this response, and wait at least until the Retry-After period has passed before sending further requests. Sending additional requests during the rate-limited window could extend its duration.
Rate limits are applied based on the access token type:
Account Tokens | 50 requests per second |
User Tokens | 15 requests per second |
These limits apply to each token's principle individually. For example, an integration could make 15 requests per second using one user's token and an additional 15 requests per second using another user's token. Account and user limits are handled separately, even if the user is on the account token's account. When a request gets throttled, only requests matching the same token principle will be throttled.
|
with a |
The Account APIs enable the retrieval of information about a Lucid account.
Basic information about an account.
{
"id": 100,
"name": "John's Account"
}
Property | Description |
---|---|
|
Number The unique ID for the authenticated account. |
|
String | null The name assigned to the account. This field is null if no name has been assigned. Names are usually set by an admin and can be a helpful way to orient a user by informing them about which account an app will interact with. |
curl 'https://api.lucid.co/accounts/me' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 100000950,
"name": "LucidCustomerAccount"
}
Retrieves basic information about the authenticated account.
|
with an Account information resource containing information about the authenticated account. |
Collaborators are users who have access to view, edit, or manage access to a document or folder. Each collaborator has a Collaborator Role which determines what actions they can execute on the document or folder they have access to.
Collaborator grants can be given to both users and groups of users. Group membership is managed by admins through the UI or the Group APIs. When a group is made a collaborator of a document or folder, all users who are actively in that group will have that level of access to the document. Users being added to or removed from a group will result in those users' access to documents or folders being updated in real time. Any users who have access to a document or folder directly and through a group will see their effective access as the greater of the two collaborator grants.
Collaboration access is inherited through folders. If a user is a collaborator on a document directly, that direct access will always take priority. Otherwise, the user's effective access level will be the greatest access from all folders the document is a descendent of in the folder tree, recursively.
It is possible for shortcuts to a document to live in other folders. These shortcut document entries do not grant any collaborator access, no matter what access a user has to the folder containing it.
Roles determine what actions a collaborator can execute on a document or folder. Collaborators with a role on a document only have the specified level of access to just that one document, but collaborators on a folder have that level of access to all of the folder's contents, recursively.
Role | Description |
---|---|
|
The owner of the document or folder, with all permissions. Cannot be changed by Collaborator APIs |
|
View, comment on, edit, and control which users can access the document or folder |
|
View, comment on, and edit the document or folder |
|
View the document or folder. Leave comments on the document |
|
View the document or folder. View basic information about the contents of a folder |
{
"documentId": "110808fd-4553-4316-bccf-4f25ff59a532",
"userId": 1298,
"role": "owner",
"created": "2021-08-24T22:42:28Z"
}
Property | Description |
---|---|
|
UUID Document ID |
|
Number User ID |
|
Role The Collaborator Role this user has on the document |
|
DateTime Date and time when the collaboration was created |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/shares/users/1298' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"documentId": "001bd56d-1b10-4196-8ac6-45e3c22bd1c6",
"userId": 1298,
"role": "owner",
"created": "2021-08-24T22:42:28Z"
}
Gets information about the user's collaboration access to the provided document.
|
ID of the document. |
|
ID of the user to retrieve collaborator settings for. |
|
with a Document User Collaborator Resource containing information about the user's collaboration settings. |
|
if the app making the request does not have permission to the document, or if the document has been deleted, or does not exist. |
|
when a user with the specified ID can not be found or does not have collaborator access to the document. |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/shares/users' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
}
HTTP/1.1 200 OK
Content-Type: application/json
Link: https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/shares/users?pageSize=20&pageToken=eyJvIjoiMSIsImUiOjE2Mjg2OTc3OTF9; rel="next"
[
{
"documentId": "001bd56d-1b10-4196-8ac6-45e3c22bd1c6",
"userId": 1001,
"role": "editandshare",
"created": "2021-01-11T20:05:00Z",
},
{
"documentId": "001bd56d-1b10-4196-8ac6-45e3c22bd1c6",
"userId": 1002,
"role": "view",
"created": "2021-01-11T20:07:03Z",
},
]
A paginated endpoint that retrieves information about all collaborators on the provided document. For more information, see Pagination.
|
ID of the document. |
|
with an array of Document User Collaborator Resources for the document's collaborators. |
|
if the token does not have permission to the document, or if the document has been deleted or does not exist. |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/shares/users/1268' \
--request 'PUT' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--header 'Content-Type: application/json' \
--data-raw '{
"role": "comment"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"documentId": "001bd56d-1b10-4196-8ac6-45e3c22bd1c6",
"userId": 1298,
"role": "comment",
"created": "2021-08-24T22:42:28Z"
}
Update the collaborator role for a user. If the user did not have access to the document before, they will be granted access and a new Document User Collaborator Resource will be created.
|
ID of the document. |
|
ID of the user whose role to create or modify. |
|
The Collaborator Role to assign to the user for this document. |
|
when updating an existing Document User Collaborator. Contains the updated Document User Collaborator Resource. |
|
when creating a new Document User Collaborator. Contains the new Document User Collaborator Resource. |
|
if the token does not have permission to the document, or if the document has been deleted or does not exist. |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/shares/users/1268' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--header 'Content-Type: application/json' \
HTTP/1.1 204 No Content
Content-Length: 0
Revoke all collaborator access to a document for the given user. The user may still have access to the document through other means such as shared folders.
|
ID of the document. |
|
ID of the user to delete collaborator settings for. |
|
the user's collaborator record on the document was successfully deleted. |
|
|
{
"folderId": 10745,
"userId": 89763,
"role": "edit",
"created": "2038-01-19T03:14:08Z"
}
Property | Description |
---|---|
|
Number Folder ID |
|
Number User ID |
|
Role The Collaborator Role this user has on the folder |
|
DateTime Date and time when the collaboration was created |
{
"folderId": 10745,
"groupId": 200363,
"role": "edit",
"created": "2038-01-19T03:14:08Z"
}
Property | Description |
---|---|
|
Number Folder ID |
|
Number Group ID |
|
Role The Collaborator Role this group has on the folder |
|
DateTime Date and time when the collaboration was created |
curl 'https://api.lucid.co/folders/2304/shares/users/1298' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"folderId": 2304,
"userId": 1298,
"role": "owner",
"created": "2021-08-24T22:42:28Z"
}
Get information about a user's direct collaborator access to a given folder. A user having access to a folder through one of the folder's ancestors will not be shown through this API.
|
ID of the folder. |
|
ID of the user to retrieve collaborator settings for. |
|
with a Folder User Collaborator Resource containing information about the user's collaboration settings. |
|
if the app making the request does not have permission to the folder, or if the folder has been deleted, or does not exist. |
|
when a user with the specified ID can not be found or does not have collaborator access to the folder. |
curl 'https://api.lucid.co/folders/1211/shares/users' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
HTTP/1.1 200 OK
Content-Type: application/json
Link: https://api.lucid.co/folders/1211/shares/users?pageSize=20&pageToken=eyJvIjoiMSIsImUiOjE2Mjg2OTc3OTF9; rel="next"
[
{
"folderId": 1211,
"userId": 1001,
"role": "editandshare",
"created": "2021-01-11T20:05:00Z",
},
{
"folderId": 1211,
"userId": 1002,
"role": "view",
"created": "2021-01-11T20:07:03Z",
},
]
Lists all users that have direct collaborator access to a given folder. A user having access to a folder through one of the folder's ancestors will not be shown through this API.
This endpoint is paginated. For more information, see Pagination.
|
ID of the folder. |
|
with an array of Folder User Collaborator Resources for the folder's collaborators. |
|
if the token does not have permission to the folder, or if the folder has been deleted or does not exist. |
curl 'https://api.lucid.co/folders/8211/shares/users/1268' \
--request 'PUT' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--header 'Content-Type: application/json' \
--data-raw '{
"role": "comment"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"folderId": 8211,
"userId": 1268,
"role": "comment",
"created": "2021-08-24T22:42:28Z"
}
Update the collaborator role for a user. If the user did not have access to the folder before, they will be granted access and a new Folder User Collaborator Resource will be created.
|
ID of the folder. |
|
ID of the user whose role to create or modify. |
|
The Collaborator Role to assign to the user for this folder. |
|
when updating an existing Folder User Collaborator. Contains the updated Folder User Collaborator Resource. |
|
when creating a new Folder User Collaborator. Contains the new Folder User Collaborator Resource. |
|
if the token does not have permission to the folder, or if the folder has been deleted or does not exist. |
curl 'https://api.lucid.co/folders/3910/shares/users/1268' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--header 'Content-Type: application/json' \
HTTP/1.1 204 No Content
Content-Length: 0
Revoke all collaborator access to a folder for the given user. The user may still have access to the folder through other means such as shared folders.
|
ID of the folder. |
|
ID of the user to delete collaborator settings for. |
|
the user's collaborator record on the folder was successfully deleted. |
|
|
curl 'https://api.lucid.co/folders/13562/shares/groups/200951' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
HTTP/1.1 200 Ok
Content-Type: application/json
{
"folderId": 13562,
"groupId": 200951,
"role": "editandshare",
"created": "2022-04-29T11:22:59Z"
}
Get information about a group's direct collaborator access to a given folder. A group having access to a folder through one of the folder's ancestors will not be shown through this API.
|
Folder ID |
|
Group ID |
|
with a Folder Group Collaborator Resource containing information about the group's collaboration access on the folder |
|
if the token does not have access to the folder, or if the folder has been deleted or does not exist |
|
when the group does not have direct collaborator access to the folder |
curl 'https://api.lucid.co/folders/13562/shares/groups' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
HTTP/1.1 200 Ok
Content-Type: application/json
Link: https://api.lucid.co/folders/13662/shares/groups?pageSize=20&pageToken=eyJvIjoiMSIsImUiOjE2Mjg2OTc3OTF9; rel="next"
[
{
"folderId": 13562,
"groupId": 200951,
"role": "editandshare",
"created": "2022-04-29T11:22:59Z"
},
{
"folderId": 13562,
"groupId": 200954,
"role": "view",
"created": "2020-03-14T01:51:03Z"
}
]
Lists all groups that have direct collaborator access to a given folder. A group having access to a folder through one of the folder's ancestors will not be shown through this API.
This endpoint is paginated. For more information, see Pagination.
|
Folder ID |
|
with an array of Folder Group Collaborator Resources containing the folder's collaborators, as well as Pagiation headers |
|
if the token does not have access to the folder, or if the folder has been deleted or does not exist |
curl 'https://api.lucid.co/folders/13562/shares/groups/200951' \
--request 'PUT' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--header 'Content-Type: application/json' \
--data-raw '{
"role": "edit"
}'
HTTP/1.1 200 Ok
Content-Type: application/json
{
"folderId": 13562,
"groupId": 200951,
"role": "edit",
"created": "2022-05-03T12:29:51Z"
}
Grant a group direct collaborator access to a given folder, or update the group's role on the folder. See the Collaborator section overview for details about how folder and document access to groups and users are inherited and interact with each other to become a user's effective access to a folder or document.
|
Folder ID |
|
Group ID |
|
The Collaborator Role to assign to the group for this folder |
|
when updating an existing Folder Group Collaborator. Contains the updated Folder Group Collaborator Resource |
|
when creating a new Folder Group Collaborator. Contains the new Folder Group Collaborator Resource |
|
if the token does not have permission to the folder, or if the folder or group have been deleted or do not exist |
curl 'https://api.lucid.co/folders/13562/shares/groups/200951' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--header 'Content-Type: application/json' \
HTTP/1.1 204 No Content
Content-Length: 0
Revoke any direct collaborator access a group has to the given folder. See the Collaborator section overview for details about how the group may still have access to the folder through other means.
|
Folder ID |
|
Group ID |
|
the groups's collaborator record on the folder was successfully deleted |
|
the token does not have permission to the folder, or if the folder has been deleted or does not exist |
The Documents APIs allow for the manipulation of all types of Lucid diagrams. For simplicity of use, all Lucid diagrams are accessible under the same endpoints. Where applicable, the Document APIs take a
{
"documentId": "110808fd-4553-4316-bccf-4f25ff59a532",
"title": "document title",
"editUrl": "https://lucid.app/lucidchart/110808fd-4553-4316-bccf-4f25ff59a532/edit",
"viewUrl": "https://lucid.app/lucidchart/110808fd-4553-4316-bccf-4f25ff59a532/view",
"version": 101,
"pageCount": 5,
"canEdit": false,
"created": "2019-04-22T13:47:23Z",
"creatorId": 12345,
"lastModified": "2020-06-26T16:29:37Z",
"lastModifiedUserId": 54321,
"customAttributes": [...],
"customTags": ["in progress"],
"product": "lucidchart",
"status": "COMPLETE",
"trashed": null,
"parent": null,
"owner": {
"id": "123456",
"type": "user",
"name": "John Doe"
}
}
The example shown for this object may not be exhaustive. More fields may appear than shown here.
Property | Description |
---|---|
|
UUID Unique ID of the document |
|
String Title of the document |
|
URI Link to edit the document |
|
URI Link to view the document |
|
Number Most recent version |
|
Number Number of pages within the document |
|
Boolean If requesting user can edit the document |
|
DateTime Date and time of when the document was created |
|
Number ID of user who created and owns the document |
|
DateTime Date and time of when the document was last modified |
|
Number ID of user who most recently modified the document |
|
Array[CustomAttribute] List of any custom attributes belonging to the document Populated for Enterprise Accounts only Learn more about Custom Attributes here |
|
Array[String] List of any custom tags assigned to the document |
|
Product The Lucid suite product of the document |
|
Current assigned status of the document Learn more about Status here |
|
If defined, the timestamp when the document was moved to the trash |
|
ID of the parent folder |
|
Information about the owner of the document. This data is only returned from the Get Document endpoint. |
{
"type": "singleLineText",
"name": "Sample Label",
"value": "This is a sample value for a custom document attribute."
}
{
"type": "singleLineText",
"name": "Sample Label",
"value": null
}
{
"type": "hierarchicalDropdown",
"name": null,
"value": [
{
"name": "Country",
"value": "USA"
},
{
"name": "City",
"value": "New York"
}
]
}
Object representing a custom attribute value for a document
Property | Description |
---|---|
|
Attribute Type The custom attribute type |
|
Title of the custom attribute. hierarchicalDropdown attributes do not have names. |
|
The value assigned to the custom attribute. The type of this value is determined by the Attribute Type |
Different possible types for a CustomAttribute. The corresponding value of the attribute depends on what the Attribute Type is.
Attribute Type | Corresponding Value Type | Description |
---|---|---|
singleLineText | String | Inputted text as a single line |
multiLineText | String | Inputted text as multiple lines |
singleSelectDropdown | String | Selected option from the dropdown box |
multiSelectDropdown | Array[String] | Array of all selected options from the multi-select dropdown box |
webLink | String | Inputted url |
numericalRange | Number | Inputted numerical value |
hierarchyDropdown | Array[DataPair] | Array of DataPair resources ordered by the hierarchy definition (top level hierarchy dropdown values are first) |
{
"id": "8e7b19ec-27ff-40e3-beb8-03f51b1661b2",
"title": "document title",
"product": "lucidchart",
"pages": [...],
"data": {
"collections": [...]
}
}
Object representing the contents of a Lucidchart document
Property | Description |
---|---|
|
UUID Document ID |
|
String Title of the document |
|
Product The Lucid suite product of the document |
|
Array[Page] Array of Page resources on the document |
|
Data Data contained on the document |
{
"id": "YGcM5DNywbTK",
"title": "document page title",
"index": 0,
"items": {
"shapes": [...],
"lines": [...],
"groups": [...],
"layers": [...]
},
"customData": [...],
"linkedData": [...]
}
Object representing a single page of a Lucidchart document.
Property | Description |
---|---|
|
String Page ID |
|
String Title of the page |
|
Integer 0-Based index of the page in the document |
|
Items Shapes, Lines, Groups, and Layers on the page |
|
Array[DataPair] Array of Data Pair resources linked to the page |
|
Array[LinkedData] Array of Linked Data resources linked to the page |
{
"shapes": [...],
"lines": [...],
"groups": [...],
"layers": [...]
}
Individual shapes, lines, groups, and layers all contain a unique
Property | Description |
---|---|
|
Array[Shape] Array of Shape resources |
|
Array[Line] Array of Line resources |
|
Array[Group] Array of Group resources |
|
Array[Layer] Array of Layer resources |
{
"id": "VTAu-oQASzul",
"class": "ProcessBlock",
"textAreas": [...],
"customData": [...],
"linkedData": [...]
}
Object representing a shape placed on a page of a document. Note that the
Property | Description |
---|---|
|
ItemId Shape ID |
|
String A unique string representing the type of the shape (e.g. ProcessBlock) |
|
Array[TextArea] Array of Text Area resources on the shape |
|
Array[DataPair] Array of Data Pair resources linked to the shape |
|
Array[LinkedData] Array of Linked Data resources linked to the shape |
{
"id": "VTAuwAeC0_R1",
"endpoint1": { "style": "None", "connectedTo": "VTAuo_Y56.q~" },
"endpoint2": { "style": "Arrow", "connectedTo": "VTAuCB8~evzW" },
"textAreas": [...],
"customData": [...],
"linkedData": [...]
}
Object representing a line on the page of a document. Note that the
Property | Description |
---|---|
|
ItemId Line ID |
|
Endpoint First endpoint of a line |
|
Endpoint Second endpoint of a line |
|
Array[TextArea] Array of Text Area resources on the line |
|
Array[DataPair] Array of Data Pair resources linked to the line |
|
Array[LinkedData] Array of Linked Data resources linked to the line |
{
"id": "VTAu-dl6qtyx",
"name": "Layer 1",
"members": ["VTAuCB8~evzW", "VTAuo_Y56.q~"],
"customData": [...],
"linkedData": [...]
}
Object representing a layer on the page of a document. Note that the
Property | Description |
---|---|
|
ItemId Layer ID |
|
String The name of the layer |
|
Array[ItemId] Array of IDs of shapes, lines, & groups contained within the layer |
|
Array[DataPair] Array of Data Pair resources linked to the layer |
|
Array[LinkedData] Array of Linked Data resources linked to the layer |
{
"id": "VTAu-dl6qtyx",
"members": ["VTAuCB8~evzW", "VTAuo_Y56.q~"],
"customData": [...],
"linkedData": [...]
}
Object representing a group on the page of a document. Note that the
Property | Description |
---|---|
|
ItemId Group ID |
|
Array[ItemId] Array of IDs of shapes, lines, & groups contained within the group |
|
Array[DataPair] Array of Data Pair resources linked to the group |
|
Array[LinkedData] Array of Linked Data resources linked to the group |
{
"style": "Arrow",
"connectedTo": null
}
Object representing the endpoint of a Line.
Property | Description |
---|---|
|
String Line end style |
|
Id of shape or line the line is connected to |
{
"label": "Text",
"text": "Start here"
}
Object representing a text area on a Shape or Line.
Property | Description |
---|---|
|
String Text area label |
|
String Text displayed in the text area. This is plain text. All formatting has been removed & formulas evaluated. |
{
"key": "Property 1",
"value": "Value 1"
}
Object representing a key-value pair of data.
Property | Description |
---|---|
|
String Custom data key |
|
String Custom data value |
{
"collection_id": "ABAuwlf2BTy8",
"data": [...],
"primaryKeyValue": "Pkey Value"
}
Object representing data linked to a resource on a document.
Property | Description |
---|---|
|
Id of the collection containing the data |
|
Array[DataPair] Key-value pairs from the dataset |
|
String The value of the primary key of the dataset |
{
"collections": [...]
}
Object representing an array of Collections on a document.
Property | Description |
---|---|
|
Array[Collection] Array of collections |
{
"id": "ABAuwlf2BTy8",
"name": "Collection 1",
"primaryKey": ["PKey 1"]
}
A collection is a container inside of a source of data. A data source can have many collections, but a collection can only belong to one data source. A collection can be thought of as a tab or individual sheet in a spreadsheet file.
Property | Description |
---|---|
|
String Id of the collection |
|
String Collection name |
|
Array[String] The primary key column name |
{
"packageId": "74672098-cf36-492c-b8e6-2c4233549cd3",
"extensionName": "sheets-adapter",
"minimumVersion": "1.4.0",
"data": {
"a": 1,
"b": 2
}
}
Bootstrap data can be attached to the created document to be consumed by a specific Extension Package. See Bootstrap Data for documents created via API for usage.
Property | Description |
---|---|
|
String Id of the extension package which will consume this data |
|
String Name of the editor extension which will consume this data. Note: this is the |
|
String Minimum version of the extension package which will consume this data |
|
Map[String, String] Data to provide to the extension package |
{
"id": 123456,
"type": "user",
"name": "John Doe"
}
This data is returned in the Document Resource data from the Get Document endpoint. This data contains information about the owner of the document.
Property | Description |
---|---|
|
Number Id of either the user or the account, depending on the type of the document user resource. |
|
String Specifies if the owner resource is referring to a user or an account. Value will be either |
|
Full name of the user that owns this document. This field is excluded if this document is owned by an account. |
For each product, there are three branches of document-related scopes:
curl 'https://api.lucid.co/documents/6fe09818-47f0-422f-886d-2e6089696824' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--header 'Accept: application/json'
HTTP/1.1 200 OK
Content-Type: application/json
{
"documentId": "110808fd-4553-4316-bccf-4f25ff59a532",
"title": "document title",
"editUrl": "https://lucid.app/lucidchart/110808fd-4553-4316-bccf-4f25ff59a532/edit",
"viewUrl": "https://lucid.app/lucidchart/110808fd-4553-4316-bccf-4f25ff59a532/view",
"version": 101,
"pageCount": 5,
"canEdit": false,
"created": "2019-04-22T13:47:23Z",
"creatorId": 12345,
"lastModified": "2020-06-26T16:29:37Z",
"lastModifiedUserId": 54321,
"customTags": ["in progress"],
"product": "lucidchart",
"status": "COMPLETE",
"parent": null,
"owner": {
"id": 123456,
"type": "user",
"name": "John Doe"
}
}
Retrieves information about the requested document, including information about the document owner in a Document Owner Resource if certain conditions are met. Requires at least read only access to the requested document.
The document owner information is only returned if the requesting user has view access and the document is unpublished. If the document is published, the user must be at least a collaborator on the document. If the document is owned by a user, information about the user is returned. If the document is in an enclosing project/team folder, information about the account is returned instead.
|
ID of the document to be retrieved. |
|
with Document resource containing information about the requested document. |
|
if the app making the request does not have permission to the document, or if the document has been deleted or does not exist. |
curl 'https://api.lucid.co/documents' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "new document title",
"product": "lucidchart",
"parent": 173,
"template": "023c0ebd-744c-4a44-87b7-f93e07390607",
"extensionBootstrapData": {
"packageId": "74672098-cf36-492c-b8e6-2c4233549cd3",
"extensionName": "sheets-adapter",
"minimumVersion": "1.4.0",
"data": {
"a": 1,
"b": 2
}
}
}'
HTTP/1.1 201 Created
Content-Type: application/json
{
"documentId": "110808fd-4553-4316-bccf-4f25ff59a532",
"title": "new document title",
"editUrl": "https://lucid.app/lucidchart/110808fd-4553-4316-bccf-4f25ff59a532/edit",
"viewUrl": "https://lucid.app/lucidchart/110808fd-4553-4316-bccf-4f25ff59a532/view",
"version": 101,
"pageCount": 5,
"canEdit": false,
"created": "2020-06-26T16:29:37Z",
"creatorId": 12345,
"lastModified": "2020-06-26T16:29:37Z",
"lastModifiedUserId": 54321,
"customTags": ["in progress"],
"product": "lucidchart",
"status": "COMPLETE",
"parent": 173
}
Creates a new document for the requesting user, with the specified title.
When there is no
|
Title that should be given to the newly created document. |
|
Product used to create the new document. |
|
ID of the folder to create the new document in. |
|
ID of the document or template to create from. |
|
Bootstrap data for a specific extension package. |
|
with Document resource containing information about the newly created document. |
|
|
A document can be copied via the Create Document endpoint. To do so, include the
curl 'https://api.lucid.co/documents' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--form 'file=@location/file.xml;type=x-application/vnd.lucid.drawio'\
--form 'title=My new document'\
--form 'parent=1234'
HTTP/1.1 201 Created
Content-Type: application/json
{
"documentId": "110808fd-4553-4316-bccf-4f25ff59a532",
"title": "My new document",
"editUrl": "https://lucid.app/lucidchart/110808fd-4553-4316-bccf-4f25ff59a532/edit",
"viewUrl": "https://lucid.app/lucidchart/110808fd-4553-4316-bccf-4f25ff59a532/view",
"version": 101,
"pageCount": 5,
"canEdit": false,
"created": "2020-06-26T16:29:37Z",
"creatorId": 12345,
"lastModified": "2020-06-26T16:29:37Z",
"lastModifiedUserId": 54321,
"customTags": ["in progress"],
"product": "lucidchart",
"status": "COMPLETE",
"parent": 1234
}
Imports an external non-Lucid file as a new document within Lucid. The file contents and type must be provided within form-data, with the supported types listed in the below chart.
Vendor | Extensions | Type | Product |
---|---|---|---|
standard (JSON) | .lucid | x-application/vnd.lucid.standardImport | Lucidchart/Lucidspark |
draw.io | .drawio .xml |
x-application/vnd.lucid.drawio | Lucidchart |
visio | .vsdx .vdx |
x-application/vnd.lucid.visio | Lucidchart |
gliffy | .gliffy .gon .gxml |
x-application/vnd.lucid.gliffy | Lucidchart |
board | x-application/vnd.lucid.board | Lucidspark |
The
The
The
|
The file data as multipart/form-data. Generally, the application or client used to make the API request will handle reading in the file data and setting the multi-part boundaries. |
|
The type of file provided for import. See Valid Import Types for options. |
|
Product used to create the new document (only required for the Lucid Standard Import). |
|
Title that should be given to the newly created document |
|
ID of the folder to create the new document in. |
|
with Document resource containing information about the newly created document. |
|
|
|
The file type provided is not supported. |
curl 'https://api.lucid.co/documents/7b36f31b-e4c0-4f2b-889f-e309c4108505?page=1&crop=10,30,30,7' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--header 'Accept: image/png;dpi=50'
HTTP/1.1 200 OK
Content-Type: image/png; dpi=50
-- <binary image data> --
Exports a given document in a specified image format. Requires at least read only access to the requested document.
The format of the exported document is set via the
Accept Header Value | Result |
---|---|
|
A png image with a DPI of 256 |
|
A jpeg image with a DPI of 160 |
|
|
id |
ID of the document to be exported. |
|
1-Based page index of the document to export. Defaults to first page. |
|
Specific page of the document to export. Only a single page is allowed Example |
|
Specifies the crop settings for the document export. Possible values:
|
|
with the binary data in the response body. The |
|
More then one |
|
if the app making the request does not have permission to the document, or if the document has been deleted or does not exist. |
|
The specified |
|
The specified image type is not supported. |
|
if the account makes more than 75 requests in 5 seconds |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/trash' \
--request 'POST' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Content-Type: application/json' \
HTTP/1.1 204 NO_CONTENT
Content-Length: 0
Moves the specified document to the trash for the requesting user. If the document is shared or part of a team folder, other users will still have access to the document. Requires the user to be the owner of the requested document or have the appropriate team folder permissions.
|
ID of the document to be moved to the trash |
|
when the document is successfully moved into the trash or is already trashed |
|
if the app making the request does not have permission to the document, or if the document has been deleted or does not exist. |
curl 'https://api.lucid.co/documents/search' \
--request 'POST' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"product": ["lucidchart", "lucidspark"],
"createdStartTime": "2020-12-31T15:00:00Z",
"createdEndTime": "2021-01-30T15:00:00Z",
"lastModifiedAfter": "2021-06-01T15:00:00Z",
"keywords": "my document"
}'
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"documentId": "110808fd-4553-4316-bccf-4f25ff59a532",
"title": "My document",
"editUrl": "https://lucid.app/lucidchart/110808fd-4553-4316-bccf-4f25ff59a532/edit",
"viewUrl": "https://lucid.app/lucidchart/110808fd-4553-4316-bccf-4f25ff59a532/view",
"version": 101,
"pageCount": 5,
"canEdit": false,
"created": "2020-12-31T18:47:23Z",
"creatorId": 12345,
"lastModified": "2021-06-25T16:29:37Z",
"lastModifiedUserId": 54321,
"customTags": ["in progress"],
"product": "lucidchart",
"status": "COMPLETE",
"parent": 1234
},
{
"documentId": "ace0736e-83bc-41bc-b5f6-ce0202b5e8bf",
"title": "My document 2",
"editUrl": "https://lucid.app/lucidspark/ace0736e-83bc-41bc-b5f6-ce0202b5e8bf/edit",
"viewUrl": "https://lucid.app/lucidspark/ace0736e-83bc-41bc-b5f6-ce0202b5e8bf/view",
"version": 33,
"pageCount": 1,
"canEdit": false,
"created": "2021-01-22T14:31:57Z",
"creatorId": 12345,
"lastModified": "2021-11-25T13:34:37Z",
"lastModifiedUserId": 54321,
"customTags": ["in progress"],
"product": "lucidspark",
"status": "COMPLETE",
"parent": 1234
}
]
Retrieves information about documents that the authenticated user has at least read only access to. Additional filtering parameters may be added.
This endpoint is paginated. For more information, see Pagination.
|
Array of Lucid suite products to filter by. Default value assumes all valid products for the given scopes. |
|
Date and time to filter documents that have been created after. Default value assumes the beginning of time. |
|
Date and time to filter documents that have been created before. Default value assumes the current instant of time. |
|
Date and time to filter documents that have been modified after. Default value assumes the beginning of time. |
|
Keywords to search against document content and titles. This field is truncated to 400 characters. When provided, results will be sorted by relevance to keyword search. |
|
with an array of Document Resource objects containing information about documents the authenticated user has access to. |
|
if the request does not contain a body |
|
if the product query parameter is used and the token's scopes do not contain the matching readonly scope for each product. |
|
if the account makes more than 300 requests in 5 seconds |
A document can be imported with JSON via the Import Document endpoint. To do so, set your file
For more information on how to use the Standard Import, refer to the extensive reference documentation here.
For examples of how to use the Standard Import, refer to the
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/contents'
--request 'GET' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Content-Type: application/json' \
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "001bd56d-1b10-4196-8ac6-45e3c22bd1c6",
"title": "Document Title",
"product": "lucidchart",
"pages": [
{
"id": "YGcM5DNywbTK",
"title": "Document Page",
"index": 0,
"items": {
"shapes": [
{
"id": "VTAu-oQASzul",
"class": "ProcessBlock",
"textAreas": [
{
"label": "Text",
"text": "Process block text"
}
],
"customData": [
{
"key": "Property 1",
"value": "Value 1"
}
],
"linkedData": [
{
"collection_id": "ABAuwlf2BTy8",
"data": [
{
"key": "Property 2",
"value": "Value 1"
}
],
"primaryKeyValue": "Pkey Value"
}
]
},
...
],
"lines": [
{
"id": "VTAusy54S7~U",
"endpoint1": {
"style": "None",
"connectedTo": "VTAu-oQASzul"
},
"endpoint2": {
"style": "Arrow",
"connectedTo": "VTAuCB8~evzW"
},
"textAreas": [
{
"label": "Text",
"text": "Line Text"
}
],
"customData": [
{
"key": "Property 1",
"value": "Value 1"
}
],
"linkedData": [
{
"collection_id": "ABAuwlf2BTy8",
"data": [
{
"key": "Property 2",
"value": "Value 1"
}
],
"primaryKeyValue": "Pkey Value"
}
]
},
...
],
"groups": [
{
"id": "F4gAugGKRJW4",
"members": [
"A4gAN9tww9u4",
"A4gAh91Vnqnz",
"A4gAO.9Y-S9I"
],
"customData": [...],
"linkedData": [...]
},
...
],
"layers": [
{
"id": "LTAu-dl6qtqx",
"name": "Layer 1",
"members": ["VTAuCB8~evzW", "VTAuo_Y56.q~"],
"customData": [...],
"linkedData": [...]
},
...
]
},
"customData": [
{
"key": "Property 1",
"value": "Value 1"
}
],
"linkedData": [...]
}
],
"data": {
"collections": [
{
"id": "ABAuwlf2BTy8",
"name": "Collection 1",
"primaryKey": ["PKey 1"]
},
...
]
}
}
Retrieves information about the contents of the requested Lucidchart document. Definitions of content returned can be found at Document Content resource
|
ID of the document to have contents retrieved. |
|
with Document Content resource containing information about the requested document's content. |
|
if the app making the request does not have permission to the document, or if the document has been deleted or does not exist. |
|
if the account makes more than 100 requests in 5 seconds |
The embedded document experience consists of two major components: document embeds and document viewers. Conceptually, a document embed represents a particular viewable instance of a document, and a document viewer represents a single rendered view of a document that is actively being viewed by a user.
Individual document embeds should be created any time you want to insert a Lucid document in a particular location in your app. A single Lucid document can have many embeds associated with it, each with its own configurations and access permission restrictions.
To embed a Lucid document, you must first generate a short-lived embed session token to be able to embed the document in an
The user associated with the user access token will be the owner of the embed. When users who are not the embed owner try to view the embed, the owning user's access token should still be used to access the embed.
Properties | Description |
---|---|
|
A list of Products that a user can choose a document from to be embedded. Defaults to all products. |
|
What type of viewer to load by defaults. If not specified, defaults to |
|
For an existing embed, which interface to show the user first. Defaults to embed viewer first. Formerly called |
|
Option to allow your app to display a customized settings view. |
Value | Description |
---|---|
|
The standard Lucid viewer experience. A fully interactive viewer with zoom, panning, and support for hotspots and other interactive elements. |
|
A basic Lucid viewer experience that can be used in place of the rich viewer if there are performance or load time concerns. The simple viewer renders non-interactive raster images instead of a high-fidelity vector experience and is a poorer fit for viewing larger documents. |
Value | Description |
---|---|
|
When loading an existing embed, go directly to the standard embedded view of the document. |
|
When loading an existing embed, show the user the embed settings interface before taking them to the standard embed view of the document. |
Value | Description |
---|---|
|
Display a "Settings for <app>" link in the embed settings view where users can update the settings. When clicked, the |
|
"Settings for <app>" link would not be available in the settings editor. |
curl 'https://api.lucid.co/embeds/token' \
--request 'POST' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"origin": "https://yourapp.example",
"sessionConfig": {
"products": ["lucidchart", "lucidspark"],
"state": "viewer",
"customSettings": "postMessage"
}
}'
HTTP/1.1 200 OK
Content-Type: application/jwt
Content-Length: 493
"eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkubHVjaWQuY28iLCJzY29wZXMiOiJsdWN \
pZGNoYXJ0LmRvY3VtZW50LmFwcC5waWNrZXIuc2hhcmUiLCJjb25maWciOnsicHJvZHVj \
dHMiOlsibHVjaWRjaGFydCIsImx1Y2lkc3BhcmsiXSwic3RhdGUiOiJ2aWV3ZXIiLCJjd \
XN0b21TZXR0aW5ncyI6InBvc3RNZXNzYWdlIn0sInN1YiI6IjhZejNVTGVDYkQ5REJHZE \
dwTFUycWE4SWJoNHVlMHF0T01TNkFhcksiLCJhdWQiOiJodHRwczovL2x1Y2lkcHJlcHJ \
vZC5hcHAiLCJ1c2VySWQiOjIwMTMwMCwiaWF0IjoxNjk1MzM0OTg3LCJleHAiOjE2OTUz \
MzU1ODcsInRva2VuX3R5cGUiOiJlbWJlZCJ9.VkrFVVwd6X3iFMl-8j2h9HIKV2FcmTw0zBUAgufFuas"
Generates a tightly-controlled, limited scope, short-term temporary access token to allow your app to display embedded Lucid documents in an
The token is short-lived, and allows the embedding website to load the document picker and document viewer, but does not grant access to any additional resource within Lucid.
|
ID of the document embed. This is needed for viewing an existing embed. |
|
The domain that will be used to host the webpage in which the document picker will be embedded. |
|
Configurations for the embed session. |
|
Valid token that can be used to embed a document picker or a document viewer. |
|
Access token is missing or invalid. |
|
Access to the embed is forbidden. |
|
The embed id in the parameter is not found. |
<iframe
src="https://lucid.app/embeds?token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkubHVjaWQuY28iLCJzY29wZXMiOiJsdWNpZGNoYXJ0LmRvY3VtZW50LmFwcC5waWNrZXIuc2hhcmUiLCJjb25maWciOnsicHJvZHVjdHMiOlsibHVjaWRjaGFydCIsImx1Y2lkc3BhcmsiXSwic3RhdGUiOiJ2aWV3ZXIiLCJjdXN0b21TZXR0aW5ncyI6InBvc3RNZXNzYWdlIn0sInN1YiI6IjhZejNVTGVDYkQ5REJHZEdwTFUycWE4SWJoNHVlMHF0T01TNkFhcksiLCJhdWQiOiJodHRwczovL2x1Y2lkcHJlcHJvZC5hcHAiLCJ1c2VySWQiOjIwMTMwMCwiaWF0IjoxNjk1MzM0OTg3LCJleHAiOjE2OTUzMzU1ODcsInRva2VuX3R5cGUiOiJlbWJlZCJ9.VkrFVVwd6X3iFMl-8j2h9HIKV2FcmTw0zBUAgufFuas"
></iframe>
HTTP/1.1 200 OK
Content-Type: text/html
-- <html data> --
Display an embed within an
<iframe
src='https://lucid.app/embeds?token=:token'
></iframe>
If no embed id was included when creating the token, the
If embed id was included, the
|
The embed session token retrieved from the Generate Embed Session Token endpoint. |
Below is a list of possible events via
The
Fired when a new embed is created by the user.
Property | Description |
---|---|
|
String |
|
String |
|
UUID ID of the selected document. |
|
String ID of the newly created document embed. |
|
String Signature of the newly created document embed. |
The
Fired when the embed settings are updated by the user.
Property | Description |
---|---|
|
String |
|
String |
|
Boolean |
The
Fired when the "Settings for <app>" button is clicked by the user.
Property | Description |
---|---|
|
String |
|
String |
The Folder APIs allow for the manipulation of folders and team folders within Lucid.
A standard representation of a folder.
{
"id": 123456789,
"type": "folder",
"name": "Folder Name",
"parent": 123456788,
"created": "2020-06-26T16:29:37Z",
"trashed": "2022-01-20T12:14:18Z"
}
Property | Description |
---|---|
|
Number Unique ID of the folder |
|
FolderType Type of the folder. |
|
String Name of the folder |
|
ID of the parent folder |
|
DateTime Date and time of when the folder was created |
|
Date and time of when the folder was trashed |
|
Folders can live in other folders, team folders, or the root of a user’s folder manager ("My Documents"). A folder in "My Documents" will have a |
|
Team folders can never live in another folder and are always located in the "Team Folders" section of a user's folder manager. Team folders will not have a parent field. Learn more |
A representation of a single item contained in a folder.
{
"id": 123456789,
"type": "folder",
"name": "Folder Name",
"shortcut": false
}
{
"id": 110808fd-4553-4316-bccf-4f25ff59a532,
"type": "document",
"name": "Document Name",
"shortcut": false,
"product": "lucidscale"
}
Property | Description |
---|---|
|
Number or UUID Unique ID of the folder or document being referred to. This field will be a Number for folders and a UUID for documents. |
|
FolderContentType Type of the folder contents entry |
|
String Name of the folder or document |
|
Boolean A boolean value indicating whether or not the folder or document is a shortcut. For more information on shortcuts and permissions see here |
|
Lucid suite product of the document. Not present for folder entries |
|
Type denoting that the Folder Content Resource is a folder and will have a Number
|
|
Type denoting that the Folder Content Resource is a document and will have a UUID
|
curl 'https://api.lucid.co/folders/123456789' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 123456789,
"type": "folder",
"name": "Folder Name",
"parent": 123456788,
"created": "2020-06-26T16:29:37Z",
"trashed": "2022-01-20T12:14:18Z"
}
Retrieves information about the requested folder.
|
ID of the folder to be retrieved. |
|
with a Folder resource containing information about the requested folder. |
|
if the app making the request does not have permission to the folder, or if the folder has been deleted (trashed is okay) or does not exist. |
curl 'https://api.lucid.co/folders' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Folder Name",
"type": "folder",
"parent": 123456788
}'
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": 123456789,
"type": "folder",
"name": "Folder Name",
"parent": 123456788,
"created": "2020-06-26T16:29:37Z",
"trashed": null
}
Create a new folder. Folders can contain documents or other folders and can be shared with collaborators.
|
Name of the folder being created. |
|
Type of the folder being created. Note: This endpoint only accepts the |
|
Destination folder to create the new folder in. If it is not provided, the folder will be created in the root of the user's folder manager ("My Documents"). |
|
with a Folder resource containing information about the newly created folder. |
|
if the request is not authorized to create in the specified |
curl 'https://api.lucid.co/folders/123456789' \
--request 'PATCH' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--data-raw '{
"name": "New Folder Name",
"parent": 123456780
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 123456789,
"type": "folder",
"name": "New Folder Name",
"parent": 123456780,
"created": "2020-06-26T16:29:37Z",
"trashed": null
}
Allows the requester to modify certain fields on a folder.
Updating the
Moving folders into or out of a Team Folder can fail for a variety of permission-related reasons. Once within a Team Folder, a folder and all of its descendants can be reorganized within that Team Folder without causing any permission errors.
|
ID of the folder to be updated. |
|
New name for the folder being updated. |
|
New parent for the folder being updated. Causes the folder to be moved into another folder if an ID is provided or into the user's root folder ("My Documents") if |
|
with a Folder resource containing information about the updated folder. |
|
if the |
|
if the app making the request does not have permission to the folder, the folder has been deleted or does not exist, or the request was not authorized to move the folder. |
curl 'https://api.lucid.co/folders/123456789/trash' \
--request 'POST' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Content-Type: application/json'
HTTP/1.1 204 No Content
Content-Length: 0
Move the given folder and all of its contents into the trash.
|
ID of the folder to be moved to the trash |
|
when the folder is successfully moved into the trash or is already trashed. |
|
if the app making the request does not have permission to the folder, or if the folder has been deleted or does not exist. |
curl 'https://api.lucid.co/folders/123456789/restore' \
--request 'POST' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Content-Type: application/json'
HTTP/1.1 204 No Content
Content-Length: 0
Move the given folder and all of its contents to their original pre-trash locations.
|
ID of the folder to be restored from the trash |
|
when the folder is successfully moved out of the trash or is already not in the trash. |
|
if the app making the request does not have permission to the folder, or if the folder has been deleted or does not exist. |
curl 'https://api.lucid.co/folders/search' \
--request 'POST' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "folder",
"keywords": "training material"
}'
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": 123456789,
"type": "folder",
"name": "Training Material 2023",
"parent": null,
"created": "2020-05-30T08:16:23Z",
"trashed": null
},
{
"id": 987654321,
"type": "folder",
"name": "October Training",
"parent": 123456789,
"created": "2020-06-26T16:29:37Z",
"trashed": null
},
]
Retrieves information about folders the authenticated user has at least read only access to. Additional filtering parameters may be added.
This endpoint is paginated. For more information, see Pagination.
|
FolderType to filter by. Default value assumes all folder types. |
|
Keywords to search against folder content and titles. This field is truncated to 400 characters. When provided, results will be sorted by relevance to keyword search. |
|
with an array of Folder Resource objects containing information about folders the authenticated user has access to. |
|
if the request does not contain a body |
|
if the account makes more than 300 requests in 5 seconds |
curl 'https://api.lucid.co/folders/987654321/contents' \
--request 'GET' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": 123456789,
"type": "folder",
"name": "Folder Name",
"shortcut": false
},
{
"id": "110808fd-4553-4316-bccf-4f25ff59a532",
"type": "document",
"name": "Document Name",
"shortcut": true,
"product": "lucidspark"
}
]
Retrieves basic information about the contents of a given folder.
This endpoint is paginated. For more information, see Pagination.
|
ID of the folder to retrieve contents of. |
|
with an array of Folder Content Resources containing information about the contents of the requested folder. |
|
if the app making the request does not have permission to the folder, or if the folder has been deleted or does not exist. |
The Sharing APIs allow for the manipulation and creation of share links to Lucid documents.
Share links are created and defined with a
If an expiration time is provided when updating or creating a share link outside of the allowable range by the account the corresponding document is on, the expiration date will be clamped to be within the maximum allowable expiration time.
If the account requires the share link to only be acceptable within the account the document belongs to, the
If the document share link belongs to an account without an enterprise license, the default
{
"restrictToAccount": false,
"expires": "2023-12-11T21:48:35.293Z",
"passcode": "password",
"allowAnonymous": false
}
Property | Description |
---|---|
|
Boolean Whether or not users outside the document's account can accept the share link |
|
If defined, the date and time the share link expires |
|
If defined, the required passcode to accept the share link |
|
Boolean Whether or not the share link allows for anonymous guests |
Roles determine what actions an invitation will grant on a document. Invitations to a document only grant the specified level of access to just that one document.
Role | Description |
---|---|
|
View, comment on, edit, and control which users can access the document |
|
View, comment on, and edit the document |
|
View the document. Leave comments on the document |
|
View the document. |
{
"shareLinkId": "inv_8a38797a-e5fc-4479-8492-e000dc93cb60",
"documentId": "f6bf19b5-d109-4ef5-92b2-cdaf0de43001",
"role": "editandshare",
"linkSecurity": {
"restrictToAccount": false,
"expires": null,
"passcode": null,
"allowAnonymous": false
},
"created": "2022-11-11T21:48:35.293Z",
"createdBy": 1280,
"lastModified": "2022-11-11T21:48:35.293Z",
"acceptUrl": "https://lucid.app/lucidchart/invitations/accept/inv_8a38797a-e5fc-4479-8492-e000dc93cb60"
}
Property | Description |
---|---|
|
String Id of the share link |
|
UUID Id of the document the share link belongs to |
|
Role The Sharing Role the share link grants on the document |
|
Document Link Security The Document Link Security settings on the share link |
|
DateTime The date and time the share link was created |
|
Number User Id of the user that created the share link |
|
DateTime The date and time the share link was last modified |
|
URI Link to accept the share link invitation |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/shares/shareLinks/inv_8a38797a-e5fc-4479-8492-e000dc93cb60' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"shareLinkId": "inv_8a38797a-e5fc-4479-8492-e000dc93cb60",
"documentId": "001bd56d-1b10-4196-8ac6-45e3c22bd1c6",
"role": "editandshare",
"linkSecurity": {
"restrictToAccount": false,
"expires": null,
"passcode": null,
"allowAnonymous": false
},
"created": "2022-11-11T21:48:35.293Z",
"createdBy": 1280,
"lastModified": "2022-11-11T21:48:35.293Z",
"acceptUrl": "https://lucid.app/lucidchart/invitations/accept/inv_8a38797a-e5fc-4479-8492-e000dc93cb60"
}
Gets information about the share link on the provided document.
|
ID of the document. |
|
Id of the share link to retrieve information for. |
|
with a Document Share Link resource containing information about the requested share link. |
|
if the app making the request does not have permission to the document, or if the document has been deleted, or does not exist. |
|
if the share link id with the specified document id does not belong to the document, does not exist, or the requesting app did not create the share link. |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/shares/shareLinks' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
--data-raw '{
"role": "editandshare",
"linkSecurity": {
"restrictToAccount": false,
"allowAnonymous": true,
"passcode": "passcode"
}
}'
HTTP/1.1 201 Created
Content-Type: application/json
{
"shareLinkId": "inv_8a38797a-e5fc-4479-8492-e000dc93cb60",
"documentId": "001bd56d-1b10-4196-8ac6-45e3c22bd1c6",
"role": "editandshare",
"linkSecurity": {
"restrictToAccount": false,
"expires": null,
"passcode": passcode,
"allowAnonymous": true
},
"created": "2022-11-11T21:48:35.293Z",
"createdBy": 1280,
"lastModified": "2022-11-11T21:48:35.293Z",
"acceptUrl": "https://lucid.app/lucidspark/invitations/accept/inv_8a38797a-e5fc-4479-8492-e000dc93cb60"
}
Creates a new share link on the provided document with the provided settings
|
ID of the document. |
|
The Sharing Role the share link will grant on the document. |
|
The Document Link Security settings on the share link. |
Note: If an expiration is provided outside the account defined limits, it will clamp to be the maximum possible time.
Note: If the
|
with a Document Share Link resource containing information about the created share link. |
|
if the the document does not belong to an enterprise account and the |
|
if the app making the request does not have permission to the document, or if the document has been deleted, or does not exist. |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/shares/shareLinks/inv_8a38797a-e5fc-4479-8492-e000dc93cb60' \
--request 'PATCH' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
--data-raw '{
"role": "editandshare",
"linkSecurity": {
"restrictToAccount": false,
"allowAnonymous": true,
"passcode": "passcode"
}
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"shareLinkId": "inv_8a38797a-e5fc-4479-8492-e000dc93cb60",
"documentId": "001bd56d-1b10-4196-8ac6-45e3c22bd1c6",
"role": "editandshare",
"linkSecurity": {
"restrictToAccount": false,
"expires": null,
"passcode": passcode,
"allowAnonymous": true
},
"created": "2022-11-11T21:48:35.293Z",
"createdBy": 1280,
"lastModified": "2022-11-11T21:48:35.293Z",
"acceptUrl": "https://lucid.app/lucidspark/invitations/accept/inv_8a38797a-e5fc-4479-8492-e000dc93cb60"
}
Updates an existing share link to the provided settings. If any settings are omitted, the already existing settings will be used instead.
|
ID of the document. |
|
ID of the share link belonging to the document. |
|
The Sharing Role the share link will grant on the document. |
|
The Document Link Security settings on the share link. |
Note: The
Note: If an expiration is provided outside the account defined limits, it will clamp to be the maximum possible time.
Note: If the
|
with a Document Share Link resource containing information about the updated share link. |
|
if the the document does not belong to an enterprise account and the |
|
if the app making the request does not have permission to the document, or if the document has been deleted, or does not exist. |
|
if the share link id with the specified document id does not belong to the document, does not exist, or the requesting app did not create the share link. |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/shares/shareLinks/inv_8a38797a-e5fc-4479-8492-e000dc93cb60' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
HTTP/1.1 204 No Content
Content-Length: 0
Deletes a share link on a document
|
ID of the document. |
|
Id of the share link to delete. |
|
if the share link was deleted successfully |
|
if the app making the request does not have permission to the document, or if the document has been deleted, or does not exist. |
|
if the share link id with the specified document id does not belong to the document, does not exist, or the requesting app did not create the share link. |
curl 'https://api.lucid.co/transferUserContent' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
--header 'Content-Type: application/json' \
--data-raw '{
"fromUser": "john.doe@example.com",
"toUser": "jane.smith@example.com"
}'
HTTP/1.1 204 No Content
Content-Length: 0
Note: This endpoint has a per account rate limit of 30 requests per 5 seconds.
Transfers ownership of Lucid documents and objects from one user to another. Note that both the
This endpoint transfers the following to the
After the transfer, the
|
Email of the user whose content will be transferred. |
|
Email of the user the content will be transferred to. |
|
when ownership is successfully transferred. |
|
when the |
|
when the users do not exist or are not on the authenticated account. |
|
if the account makes more than 30 requests in 5 seconds |
The User APIs enable the manipulation of Lucid users and their administrative roles.
A standard representation of a user.
{
"accountId": 100,
"email": "john-doe@example.com",
"name": "John Doe",
"userId": 101,
"username": "johndoe",
"roles": ["billing-admin", "team-admin"]
}
Property | Description |
---|---|
|
Number The unique ID for the user's account. |
|
String The user's email. |
|
String The user's full name. |
|
Number The unique ID for the user. |
|
String The user's username. |
|
Array[String] A list of administrative roles assigned to the user. |
Assigning a role to a user allows that user to perform administrative actions associated with that role.
|
Billing admins can change payment options for the account. |
|
Document approvers can approve documents. |
|
Team admins can access and edit team settings, including user roles and groups. |
The Profile resource contains basic profile information about a user.
{
"username": "johndoe",
"email": "john-doe@example.com",
"fullName": "John Doe",
"id": 101,
"accountId": 100
}
Property | Description |
---|---|
|
Number The unique ID for the user's account. |
|
String Username of the user |
|
String Email of the user |
|
String Full name of the user |
|
UserId ID of the user |
curl 'https://api.lucid.co/users/204' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"accountId": 100,
"email": "jane-doe@example.com",
"name": "Jane Doe",
"userId": 204,
"username": "janedoe",
"roles": []
}
Retrieves information about the requested user. The requested user must be on to the authenticated account.
|
ID of the user to be retrieved. |
|
with a User resource containing information about the user. |
|
if the user does not belong to the authenticated account or if the user does not exist. |
curl 'https://api.lucid.co/users' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
HTTP/1.1 200 OK
Content-Type: application/json
Link: https://api.lucid.co/users?pageSize=20&pageToken=eyJvIjoiMSIsImUiOjE2Mjg2OTc3OTF9; rel="next"
[
{
"accountId": 100,
"email": "john-doe@example.com",
"name": "John Doe",
"userId": 101,
"username": "johndoe",
"roles": ["billing-admin", "team-admin"]
},
{
"accountId": 100,
"email": "jane-doe@example.com",
"name": "Jane Doe",
"userId": 204,
"username": "janedoe",
"roles": []
}
]
A paginated endpoint that retrieves information about all users on the authenticated account. For more information, see Pagination.
|
with a list of User resources containing information about users on the account. |
curl 'https://api.lucid.co/users/searchByEmail' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--header 'Content-Type: application/json' \
--data-raw '{
"emails": [
"john-doe@example.com",
"jane-doe@example.com",
"not-a-user@example.com"
]
}'
HTTP/1.1 200 OK
Content-Type: application/json
Link: https://api.lucid.co/users/searchByEmail"
[
{
"accountId": 100,
"email": "john-doe@example.com",
"fullName": "John Doe",
"id": 101,
"username": "johndoe"
},
{
"accountId": 100,
"email": "jane-doe@example.com",
"fullName": "Jane Doe",
"id": 204,
"username": "janedoe"
}
]
Retrieves information about all users on the authenticated user's account whose email is provided. Email matching is a case insensitive exact match. Emails that do not exactly match a user on the account will be disregarded.
|
List of User emails to search for. Limited to 200 items. |
|
with a list of Profile resources containing information about users on the account. Emails that could not be matched are not included. |
|
if the request body emails exceed 200 items. |
|
if any of the strings in the request body can not be parsed into the email format. |
curl 'https://api.lucid.co/users/me/profile' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"username": "johndoe",
"email": "john-doe@example.com",
"fullName": "John Doe",
"id": 101
}
Retrieves basic information about the authenticated user.
|
with a Profile resource containing information about the requesting user. |
curl 'https://api.lucid.co/users' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "john-doe@example.com",
"firstName": "John",
"lastName": "Doe",
"username": "john-doe@example.com",
"password": "`.~b"J<CA95m`bV@",
"roles": ["billing-admin", "team-admin"]
}'
HTTP/1.1 201 Created
Content-Type: application/json
{
"accountId": 100000950,
"email": "john-doe@example.com",
"name": "John Doe",
"userId": 2283,
"username": "john-doe@example.com",
"roles": ["billing-admin", "team-admin"]
}
Creates a new user and adds them to the authenticated account. Licenses are granted to the user based on the authenticated account's auto licensing settings. Learn more.
|
The user's email |
|
The user's first name |
|
The user's last name |
|
The user's username. If not provided the email will be used as the username. |
|
The user's password. |
|
A list of roles assigned to the user. |
|
with a User resource containing information about the created user. |
|
if any input field is invalid. |
|
|
|
if a user with the same email or username already exists. |
The Unfurling APIs allow for the manipulation of links in Lucid to provide the ability to easily embed and view Lucid documents.
Resource representing information contained in a Lucid link
{
"document": {
"documentId": "110808fd-4553-4316-bccf-4f25ff59a532",
"page": null,
"product": "lucidspark"
}
"invitation": {
"invitationId": "inv_288b9365-685b-4bf2-9f6f-8aa9e2082542",
}
}
Property | Description |
---|---|
|
Information about the Document contained in the link if it exists |
|
Information about the Invitation contained in the link if it exists |
Resource representing document information contained in a Lucid link
{
"documentId": "110808fd-4553-4316-bccf-4f25ff59a532",
"page": null,
"product": "lucidspark",
"basicEmbed": "https://lucid.app/documents/110808fd-4553-4316-bccf-4f25ff59a532/viewer?authType=local"
}
Property | Description |
---|---|
|
ID of the document contained in the link if it exists |
|
Document page contained in the link if it exists |
|
Lucid suite product contained in the link if it exists |
|
Link to iframeable embed using cookie based authentication |
Resource representing invitation information contained in a Lucid link
{
"invitationId": "inv_288b9365-685b-4bf2-9f6f-8aa9e2082542",
}
Property | Description |
---|---|
|
Id of the invitiation contained in the link if it exists |
<iframe
src="https://lucid.app/embeds/link?clientId=FNvGih-a3gx3MC_FsM1Wo-obFxgIRQ74dyySsoyg&document=https://lucid.app/lucidchart/fb892462-7199-4daa-a7d1-b76ea7a0e267/edit?from_internal=true"
></iframe>
HTTP/1.1 200 OK
Content-Type: text/html
-- <html data> --
Display an embed within an
<iframe
src='https://lucid.app/embeds/link?document=:document&clientId=:clientId'
></iframe>
If the clientId is valid with the registered embed domain in the developer portal, the
|
|
|
|
curl 'https://api.lucid.co/describeLink' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Lucid-Api-Version: 1' \
--data-raw '{
"url": "https://lucid.app/lucidchart/90e5f020-0f26-4d15-8955-d96dca8bf9a4/edit?page=K2hT2&invitationId=inv_74610d09-7f84-496b-8aa6-5599782176a6#"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"document": {
"documentId": "90e5f020-0f26-4d15-8955-d96dca8bf9a4",
"page": "K2hT2",
"product": "lucidchart"
"basicEmbed": "https://lucid.app/documents/90e5f020-0f26-4d15-8955-d96dca8bf9a4/viewer?page=K2hT2&authType=local"
},
"invitation": {
"invitationId": "inv_74610d09-7f84-496b-8aa6-5599782176a6",
}
}
Parses and retrieves information from the provided Lucid document link. This does not confirm that the document or resource exists.
Unrestricted
|
The url of the Lucid document link to parse information from |
|
with a Link resource containing information about the document link. |
|
if the |
The following APIs for programatically manipulating document embeds might be helpful, but they are not necessary for basic use cases. The process for creating embeds and updating embed settings are handled by the APIs in the Document Embedding section.
{
"embedId": "298f9a4a-09b5-440c-b95e-4d5c2d1aaf49",
"documentId": "71608643-765a-4b44-ae64-4f44425b395e",
"embedVersion": "latest-version",
"created": "2021-06-26T16:29:37Z",
"modified": "2021-08-02T04:16:52Z"
}
Property | Description |
---|---|
|
UUID Unique ID associated with the embed |
|
UUID ID of the document |
|
DocumentEmbedVersion "latest-version" or "snapshot-version" |
|
DateTime Date and time of when the embed was created |
|
DateTime Date and time of when the embed was last modified |
{
"embedId": "298f9a4a-09b5-440c-b95e-4d5c2d1aaf49",
"documentId": "71608643-765a-4b44-ae64-4f44425b395e",
"pageCount": 2,
"title": "Example Document",
}
Property | Description |
---|---|
|
UUID Unique ID associated with the embed |
|
UUID ID of the document |
|
Integer Number of pages in the embedded document |
|
String Title of the embedded document |
Value | Description |
---|---|
|
The embed will always show the latest version of the document. |
|
Takes a snapshot of the document when the embed is created. The embed will always show that snapshot. |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/embeds/ec890631-c150-461c-992f-b96533aa05f4' \
--request 'GET' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Accept: application/json'
HTTP/1.1 200 Ok
Content-Type: application/json
{
"embedId":"ec890631-c150-461c-992f-b96533aa05f4",
"documentId":"001bd56d-1b10-4196-8ac6-45e3c22bd1c6",
"embedVersion":"snapshot-version",
"created":"2021-10-01T20:49:36.169Z",
"modified":"2021-10-01T20:49:36.169Z"
}
Retrieves information about the requested document embed.
|
ID of the embedded document to retrieve |
|
ID of the document embed to retrieve |
|
with Document Embed Resource containing information about the requested document embed. |
|
when the authorized token does not have permission to access the requested document or embed, or when the requested document or embed does not exist. |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/embeds/ec890631-c150-461c-992f-b96533aa05f4/document' \
--request 'GET' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>'
HTTP/1.1 200 Ok
Content-Type: application/json
{
"embedId":"ec890631-c150-461c-992f-b96533aa05f4",
"documentId":"001bd56d-1b10-4196-8ac6-45e3c22bd1c6",
"pageCount":5,
"title":"Documentation example document",
}
Retrieves limited metadata about the embedded document. If the embed is a snapshot-version embed, the metadata will be drawn from the state of the document at the time that the snapshot was created.
|
ID of the embedded document to retrieve |
|
ID of the document embed to retrieve |
|
with Document Embed Document Resource containing the title and page count of the requested document embed. |
|
when the authorized token does not have permission to access the requested document or embed, or when the requested document or embed does not exist. |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/embeds' \
--request 'POST' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"embedVersion": "snapshot-version"
}'
HTTP/1.1 201 Created
Content-Type: application/json
{
"embedId":"ec890631-c150-461c-992f-b96533aa05f4",
"documentId":"001bd56d-1b10-4196-8ac6-45e3c22bd1c6",
"embedVersion":"snapshot-version",
"created":"2021-10-01T20:49:36.169Z",
"modified":"2021-10-01T20:49:36.169Z"
}
Creates an embed resource associated with a particular document. The request must be authenticated with an OAuth2 token that has access to the document.
|
ID of the document to be embedded |
|
Determines what version of the document will be loaded in the document viewer. |
|
with Document Embed Resource containing information about the newly created document embed. |
|
if the embed version provided in the request body is invalid. |
|
when the access token isn't allowed to create an embed for this document. |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/embeds/298f9a4a-09b5-440c-b95e-4d5c2d1aaf49/changeVersion' \
--request 'POST' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"embedVersion": "latest-version"
}'
HTTP/1.1 201 Created
Content-Type: application/json
{
"embedId":"298f9a4a-09b5-440c-b95e-4d5c2d1aaf49",
"documentId":"001bd56d-1b10-4196-8ac6-45e3c22bd1c6",
"embedVersion":"latest-version",
"created":"2021-10-01T20:49:36.169Z",
"modified":"2021-10-01T20:49:36.169Z"
}
Updates the version type of an existing document embed. Calling this endpoint with an embedVersion of "snapshot-version" will associate the existing embed with a snapshot of the current state of the document, even if the embed was already associated with an older snapshot of the document.
|
ID of the document |
|
ID of the document embed |
|
Determines what version of the document will be loaded in the document viewer. |
|
with Document Embed Resource containing information about the updated document embed. |
|
if the embed version provided in the request body is invalid. |
|
when the access token isn't allowed to change the embed version. |
curl 'https://api.lucid.co/documents/001bd56d-1b10-4196-8ac6-45e3c22bd1c6/embeds/298f9a4a-09b5-440c-b95e-4d5c2d1aaf49' \
--request 'DELETE' \
--header 'Lucid-Api-Version: 1' \
--header 'Authorization: Bearer <OAuth 2.0 Access Token>'
HTTP/1.1 204 No Content
Content-Length: 0
Deletes an existing document embed.
|
ID of the document |
|
ID of the document embed |
|
when the document embed is deleted successfully. |
|
when the access token isn't allowed to delete the embed. |
In order to use the Lucidchart API, a client must have permission from the user to access their data. This permission is granted with an OAuth 1.0 access token following the OAuth 1.0 specification. Details of the OAuth 1.0 authorization process and libraries for most languages can be found at https://oauth.net/1/.
To obtain an access token, the following steps need to be taken:
Request an OAuth consumer key and secret from this page.
Obtain a request token. Using the consumer key and secret obtained in step 1, a request token can be obtained by following the OAuth 1.0 protocol (see Obtaining an Unauthorized Request Token). The callback should be provided as part of making the call for a request token (Lucidchart does not currently support the OOB flow).
The endpoint for obtaining a request token is:
Obtain authorization. Authorization is obtained by redirecting the user to the Lucidchart authorization page with the appropriate oauth query parameters (see Obtaining User Authorization).
Obtain the access token. If the user authorizes the third party, they will be redirected back to the third-party callback URL (that was provided when when the request token was requested) with a verifier as described in the oauth specification. Using the verifier and request token, the third party can request an access token (see Obtaining an Access Token).
The endpoint for obtaining an access token is:
With the access token, a third party can sign requests to the Lucidchart API and get access to users data (see Signing Requests). Note that the Access Token can be revoked by the user at any time the user decides they no longer want the third party to have access to their Lucid data.
The Data API lets you bring any kind of data into Lucid and visualize it. Using a simple REST API, changes to your data can be reflected in the document in a near real-time. The Data API facilitates:
Using the Data API allows Lucid Enterprise customers to flexibly add data to their documents without sacrificing any of the real-time collaboration and granular access control features that are central to the Lucid platform.
Every request using the Data API must be authenticated with valid user credentials. This API supports both OAuth 1.0 authentication and OAuth 2.0 authentication.
To prevent abuse and undue stress on the system the Data API has a rate limiting feature (sometimes called throttling) that restricts the requests of users.
Lucid recommends that you design your integration to gracefully handle this rate limit error. One way of doing that would be to have your integration sleep for 60 seconds when this error is encountered, and then subsequently retry the request. Alternatively, you might choose to implement exponential backoff, an error handling strategy whereby you periodically retry a failed request with progressively longer wait times between retries until either the request succeeds or the certain number of retry attempts is reached.
The error can be identified by having a
Hard Refresh Interval | 30 seconds since last |
Soft Refresh Interval | 30 seconds since last |
User API Rate | 750 requests per minute |
File Size Limit | 3 MB |
curl 'https://data.lucid.app/rateLimits' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"userHardRefreshInterval": 30,
"userSoftRefreshInterval": 30,
"userApiCallRate": 750,
"fileSizeLimit": 3
}
See what your current rate limits are.
|
with current limits for requesting user. |
A data set is a logical grouping of data sources and can be thought of as a group of related spreadsheet files. A data set can contain multiple related data sources, but a data source can be a member of at most one data set.
The data set endpoints are responsible for the creation, deletion, and updating of data sets. The available actions are outlined below. A user can only modify data sets they have access to.
For most API use cases a data set is not needed since a data source can be used without a data set.
{
"uri": "https://data.lucid.app/dataSets/2168",
"name": "Data Set Name",
"properties": "https://data.lucid.app/dataSets/2168/properties",
"created": "2021-06-02T19:52:33Z",
"modified": "2021-06-02T19:52:33Z",
"creatorId": 123456,
"dataSetGrants": "https://data.lucid.app/dataSetGrants?dataSet=https%3A%2F%2Fdata.lucid.app%2FdataSets%2F2168",
"dataSources": "https://data.lucid.app/dataSources?dataSet=https%3A%2F%2Fdata.lucid.app%2FdataSets%2F2168"
}
Property | Description |
---|---|
|
URI Link to get self |
|
String Name of the data set |
|
URI Link to get properties specific to this data set |
|
DateTime Timestamp of when the data set was created |
|
DateTime Timestamp of when the data set was last modified |
|
Integer Id of user who created the data set |
|
URI Link to get grants for this data set |
|
URI Link to get data sources connected to this data set |
{
"dataSets": [Data Set, Data Set, ...],
"total": 125,
"prev": "https://data.lucid.app/dataSets?start=80&end=90",
"next": "https://data.lucid.app/dataSets?start=100&end=110"
}
Property | Description |
---|---|
|
Array[Data Set] Array of data sets |
|
Number Total number of existing data sets |
|
URI Link to get the previous list of data sets |
|
URI Link to get the next list of data sets |
curl 'https://data.lucid.app/dataSets' \
--request 'HEAD' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
lucid-datasets-total: 123
Content-Length: 0
This endpoint returns the number of data sets a user has access to. The return value is in the response headers as
|
with |
curl 'https://data.lucid.app/dataSets/2168' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/dataSets/2168",
"name": "Data Set Name",
"properties": "https://data.lucid.app/dataSets/2168/properties",
"created": "2021-06-02T19:52:33Z",
"modified": "2021-06-02T19:52:33Z",
"creatorId": 123456,
"dataSetGrants": "https://data.lucid.app/dataSetGrants?dataSet=https%3A%2F%2Fdata.lucid.app%2FdataSets%2F2168",
"dataSources": "https://data.lucid.app/dataSources?dataSet=https%3A%2F%2Fdata.lucid.app%2FdataSets%2F2168"
}
Gets a specific existing data set from Lucid
|
ID of data set to be retrieved |
|
with Data Set |
curl 'https://data.lucid.app/dataSets?start=1&end=100' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"uri": "https://data.lucid.app/dataSets/2168",
"name": "Data Set Name",
"properties": "https://data.lucid.app/dataSets/2168/properties",
"created": "2021-06-02T19:52:33Z",
"modified": "2021-06-02T19:52:33Z",
"creatorId": 123456,
"dataSetGrants": "https://data.lucid.app/dataSetGrants?dataSet=https%3A%2F%2Fdata.lucid.app%2FdataSets%2F2168",
"dataSources": "https://data.lucid.app/dataSources?dataSet=https%3A%2F%2Fdata.lucid.app%2FdataSets%2F2168"
}
]
This endpoint returns all data sets that the user has access to. The results will be paginated. If the number of data sets exceeds the pagination limit, links will be provided to get the next set of results or the previous set of results (if applicable). The range of returned values can be determined by optional start and end parameters. If the difference between the end and start values is greater than the pagination limit, the endpoint returns data sets in the range from start to start + pagination limit. Items in the response are determined based on their creation order.
|
Starting 1-based index of data sets to retreive. Defaults to 1. |
|
Ending index of data sets to retreive. Defaults to 100. |
|
with paginated list of Data Sets |
curl 'https://data.lucid.app/dataSets' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"name": "Data Set Name",
"properties": {
"Color": "green",
"AuthoredBy": "Lucidchart"
}
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/dataSets/2168",
"name": "Data Set Name",
"properties": "https://data.lucid.app/dataSets/2168/properties",
"created": "2021-06-02T19:52:33Z",
"modified": "2021-06-02T19:52:33Z",
"creatorId": 123456,
"dataSetGrants": "https://data.lucid.app/dataSetGrants?dataSet=https%3A%2F%2Fdata.lucid.app%2FdataSets%2F2168",
"dataSources": "https://data.lucid.app/dataSources?dataSet=https%3A%2F%2Fdata.lucid.app%2FdataSets%2F2168"
}
Creates a new data set and a corresponding new data set grant for the user. Note that a data set cannot be created with data sources already inside it, so data sources must be added to a data set through either the Create Data Source endpoint or the Update Data Source endpoint.
|
Name to give to new data set |
|
Used to create the data set properties for the new data set. |
|
with Data Set |
curl 'https://data.lucid.app/dataSets/2168' \
--request 'PATCH' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"name": "New Data Set Name",
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/dataSets/2168",
"name": "New Data Set Name",
"properties": "https://data.lucid.app/dataSets/2168/properties",
"created": "2021-06-02T19:52:33Z",
"modified": "2021-06-02T19:52:33Z",
"creatorId": 123456,
"dataSetGrants": "https://data.lucid.app/dataSetGrants?dataSet=https%3A%2F%2Fdata.lucid.app%2FdataSets%2F2168",
"dataSources": "https://data.lucid.app/dataSources?dataSet=https%3A%2F%2Fdata.lucid.app%2FdataSets%2F2168"
}
This endpoint takes the payload specified below and updates the data set name. Updates will only occur if the user has access to the data set. Note that the other fields in a dataset cannot be updated through this endpoint.
|
Name to give to existing data set |
|
with Data Set |
curl 'https://data.lucid.app/dataSets/435' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Length: 0
This removes the specified data set and its associated properties. Once deleted, none of the information can be recovered. The data sources in the set will be removed from the data set but otherwise they will not be deleted or altered.
|
ID of data set to be deleted |
|
Each data set must have one or more associated data set grant(s). The data set grants' purpose is to specify the authorization level of the data set. Each data set grant consists of a role, a permission type, and an identifier string saying which user, account or document the permission belongs to.
These endpoints are responsible for creating and deleting data set grants. The available endpoints are outlined below. Each endpoint takes optional access tokens to determine access to the requested resource. A user can create and delete data set grants only if they have appropriate access.
{
"uri": "https://data.lucid.app/dataSetGrants/8",
"dataSet": "https://data.lucid.app/dataSets/435",
"permissionType": "account",
"identifier": "1234",
"role": "edit"
}
Property | Description |
---|---|
|
URI Link to get self |
|
URI Link to get data set |
|
String Permission type granted. "user": This permission grants access to individual users if their Lucid id is equal to the grant's identifier string. "account": This permission grants access to every user on the account specified by the grant's identifier string. "document": This permission grants access to anyone who has access to the document referenced in the grant value, even if they are not a user on the associated Lucid account. Note that the kind of access a user has to a particular document affects the permissions granted by a data set grant through that document. In particular, if a user has read-only permissions on a particular document, any data set grant through that document will give them at most the 'view' access level, regardless of the access level listed on the data set grant itself. |
|
String The document id, account id, or user id matching the permission type |
|
String Available types are: "edit" and "view" |
curl 'https://data.lucid.app/dataSetGrants/435' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/dataSetGrants/435",
"dataSet": "https://data.lucid.app/dataSets/8",
"permissionType": "account",
"identifier": "1234",
"role": "edit"
}
Gets the requested data set grant if the access tokens are valid and the user has access to the data set. Note that the id in the URI is the number at the end of the data set grant's uri, not the identifier field of the object.
|
ID of data set grant to be retrieved |
|
with Data Set Grant |
curl 'https://data.lucid.app/dataSetGrants?dataSet=https://data.lucid.app/dataSets/435' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"uri": "https://data.lucid.app/dataSetGrants/8",
"dataSet": "https://data.lucid.app/dataSets/435",
"permissionType": "account",
"identifier": "1234",
"role": "edit"
},
{
"uri": "https://data.lucid.app/dataSetGrants/26",
"dataSet": "https://data.lucid.app/dataSets/435",
"permissionType": "user",
"identifier": "9999",
"role": "view"
}
]
Finds and returns all data set grants for the queried data set if the user has access to the data set.
|
Data set to find all grants for. |
|
with Array[Data Set Grant] |
curl 'https://data.lucid.app/dataSetGrants' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"dataSet": "https://data.lucid.app/dataSets/8",
"permissionType": "account",
"identifier": "1234",
"role": "edit"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/dataSetGrants/8",
"dataSet": "https://data.lucid.app/dataSets/435",
"permissionType": "account",
"identifier": "1234",
"role": "edit"
}
Creates a new data set grant for the specified data set. The requesting user must have access to the data set in order for it to succeed.
Creates a new data set grant for the specified data set. The requesting user must have access to the data set in order for it to succeed.
|
Data set to add grant to. |
|
Type of permission being given. Valid values are "account", "document" or "user". |
|
Identifier for permission type. |
|
Role being given. Valid values are "view" and "edit". |
|
with Data Set Grant |
curl 'https://data.lucid.app/dataSetGrants/26' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Length: 0
Removes the specified data set grant ONLY if it's not the last data set grant. There must always be at least one data set grant for a given data set, therefore the last data set grant cannot be deleted. A response message is returned with the result of the deletion. Note that the id in the URI is the number at the end of the data set grant's URI, not the identifier field of the Data Set Grant.
|
ID of data set grant to be deleted |
|
Data sets can have properties that can describe a data set as a whole. Data set properties are a key-value store of information that is available to the consumer of the data set. Data set properties are very similar to collection properties.
The data set property endpoints are responsible for the creation, deletion, and updating of properties associated with a data set. The available endpoints are outlined below. A user can modify properties if they have access to the parent data set.
curl 'https://data.lucid.app/dataSets/435/properties' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"backgroundColor": "blue",
"font": "Times New Roman"
}
Gets all properties for the specified data set if the user has access to the data set.
|
ID of data set to get properties for |
|
with Map[String,JsValue] of properties on the specified data set |
curl 'https://data.lucid.app/dataSets/184/properties' \
--request 'PATCH' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"backgroundColor": "blue",
"font": "Times New Roman"
}
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"backgroundColor": "blue",
"font": "Times New Roman"
}
Allows a user to update the properties on a data set. This endpoint uses the supplied values to either update existing properties or add new properties.
|
ID of data set to update properties for |
|
|
|
with list of properties that were affected |
curl 'https://data.lucid.app/dataSets/435/properties?properties=prop1,prop2' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Length: 0
Removes only the properties provided in the query parameter. The deleted properties cannot be undone. The deletion will only occur if the user has access to the data set.
|
ID of data set for properties to be deleted from |
|
List of property names to remove from specified data set. |
|
A data source is comprised of collections and can be thought of as a spreadsheet file, structured like an Excel file or a Google Sheets document. A data source can optionally belong to at most one data set, but it can also exist without belonging to any data set.
The data source endpoints are responsible for the creation, deletion, and updating of data sources. The available actions are outlined below. A user can only modify the data sources that they have access to.
{
"uri": "https://data.lucid.app/dataSources/2967",
"name": "Internal Org Chart",
"product": "chart",
"sourceGrants": "https://data.lucid.app/sourceGrants?dataSource=https://data.lucid.app/dataSources/2967",
"adapterType": "DATA_API",
"collections": "https://data.lucid.app/collections?dataSource=https://data.lucid.app/dataSources/2967",
"items": "https://data.lucid.app/dataSources/2967/items",
"linkParameters": {},
"created": "2018-08-08T21:26:03Z",
"lastModified": "2019-12-10T17:24:56Z",
"deleted": null,
"pending": false,
"dataSet": null
}
Property | Description |
---|---|
|
URI Link to get self |
|
String Name of data source |
|
URI Link to get grants specific to this data source |
|
Adapter Type Type of the data source |
|
URI Link to get Collections connected to this data source |
|
DateTime Timestamp of when this data source was created |
|
DateTime Timestamp of when this data source was last modified |
|
Boolean If a data source is marked pending it won't be available for users to select within Lucid |
|
URI Link to get connected data set |
|
Object |
|
DateTime |
|
Mimics settings within Lucidchart editor as if it was a CSV file upload. |
|
Created with the Data API, sources of this type can get automatic updates within the Lucidchart data linking panel. |
|
Default if not provided. |
{
"dataSources": [Data Source, Data Source, ...],
"total": 125,
"prev": "https://data.lucid.app/dataSources?start=80&end=90",
"next": "https://data.lucid.app/dataSources?start=100&end=110"
}
Property | Description |
---|---|
|
Array[Data Source] Array of data sources |
|
Number Total number of existing data sources |
|
URI Link to get the previous list of data sources |
|
URI Link to get the next list of data sources |
curl 'https://data.lucid.app/dataSources' \
--request 'HEAD' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
lucid-datasources-total: 123
Content-Length: 0
This endpoint returns the number of data sources a user has access to. The return value is in the response headers as
|
with |
curl 'https://data.lucid.app/dataSources/123' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/dataSources/2967",
"name": "BambooHR",
"product": "chart",
"sourceGrants": "https://data.lucid.app/sourceGrants?dataSource=https://data.lucid.app/dataSources/2967",
"adapterType": "BAMBOO_HR",
"collections": "https://data.lucid.app/collections?dataSource=https://data.lucid.app/dataSources/2967",
"items": "https://data.lucid.app/dataSources/2967/items",
"linkParameters": {},
"created": "2018-08-08T21:26:03Z",
"lastModified": "2019-12-10T17:24:56Z",
"deleted": null,
"pending": false,
"dataSet": null
}
Gets a specific existing data source from Lucid. If the creator of the data source is the user making the request, the link parameters will be returned with the data source.
|
ID of data source to be retrieved. |
|
with Data Source |
curl 'https://data.lucid.app/dataSources?start=1&end=100' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"dataSources": [Data Source, Data Source, ...],
"total": 125,
"prev": "https://data.lucid.app/dataSources?start=80&end=90",
"next": "https://data.lucid.app/dataSources?start=100&end=110"
}
This endpoint returns all data sources that the user has access to. The results will be paginated. If the number of data sources exceeds the pagination limit, links will be provided to get the next set of results or the previous set of results (if applicable). The range of returned values can be determined by optional start and end parameters. If the difference between the end and start values is greater than the pagination limit, the endpoint returns data sources in the range from start to start + pagination limit. Items in the response are determined based on their creation order.
|
Starting 1-based index of data sources to retreive. Defaults to 1. |
|
Ending index of data sources to retreive. Defaults to 1000. |
|
with paginated list of Data Sources |
curl 'https://data.lucid.app/dataSources' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
-- data-raw '{
"name": "New Data Source",
"adapterType": "DATA_API"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/dataSources/2967",
"name": "New Data Source",
"product": "chart",
"sourceGrants": "https://data.lucid.app/sourceGrants?dataSource=https://data.lucid.app/dataSources/2967",
"adapterType": "DATA_API",
"collections": "https://data.lucid.app/collections?dataSource=https://data.lucid.app/dataSources/2967",
"items": "https://data.lucid.app/dataSources/2967/items",
"linkParameters": {},
"created": "2018-08-08T21:26:03Z",
"lastModified": "2019-12-10T17:24:56Z",
"deleted": null,
"pending": false,
"dataSet": null
}
Creates a new data source and a corresponding new data source grant for the user.
|
Name to give to new data source. |
|
If not provided the type will be UNKNOWN. |
|
with Data Source |
curl 'https://data.lucid.app/adapter/csv' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--form 'file=@location/file.csv'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/dataSources/2967",
"name": "New Data Source",
"product": "chart",
"sourceGrants": "https://data.lucid.app/sourceGrants?dataSource=https://data.lucid.app/dataSources/2967",
"adapterType": "CSV",
"collections": "https://data.lucid.app/collections?dataSource=https://data.lucid.app/dataSources/2967",
"items": "https://data.lucid.app/dataSources/2967/items",
"linkParameters": {},
"created": "2022-08-08T21:26:03Z",
"lastModified": "2022-12-10T17:24:56Z",
"deleted": null,
"pending": false,
"dataSet": null
}
If able to successfully parse the attached file as a CSV file, a new data source with be created (with the same name as the attached file) that includes a single collection. The single collection in the newly created data source will contain the data from the CSV file. Each row will be an item, and each column will be labelled A, B, C, …, AA, AB, AC, .. in the order in which they were in the original file. There will be a single metadata collection created which represents the mapping between the id of each created item and the original row number of the row it was created from.
|
The file data as multipart/form-data. Generally, the application or client used to make the API request will handle reading in the file data and setting the multi-part boundaries. |
|
with Data Source |
|
if no file provided or unable to read file |
curl 'https://data.lucid.app/adapter/csv?dataSource=https://data.lucid.app/dataSources/2967&collection=https://data.lucid.app/collections/2967' \
--request 'PUT' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--form 'file=@location/file.csv'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/dataSources/2967",
"name": "New Data Source",
"product": "chart",
"sourceGrants": "https://data.lucid.app/sourceGrants?dataSource=https://data.lucid.app/dataSources/2967",
"adapterType": "CSV",
"collections": "https://data.lucid.app/collections?dataSource=https://data.lucid.app/dataSources/2967",
"items": "https://data.lucid.app/dataSources/2967/items",
"linkParameters": {},
"created": "2022-08-08T21:26:03Z",
"lastModified": "2022-12-10T17:24:56Z",
"deleted": null,
"pending": false,
"dataSet": null
}
If able to successfully parse the attached file as a CSV file, the endpoint will overwrite the contents of the single collection with the new data. The collection reference is left unchanged, but will have new items.
A specific collection in a data source can be replaced by including both the data source and collection query parameters. In this case, the items in that single collection will be overwritten with the values from the CSV. The target collection's id will remain the same, i.e., the original collection is the same, just the items have changed. The specified collection must belong to the specified data source.
|
Link including datasource id. |
|
Link including collection id. If the specified datasource has only one collection this doesn't need to be provided. |
|
The file data as multipart/form-data. Generally, the application or client used to make the API request will handle reading in the file data and setting the multi-part boundaries. |
|
with Data Source |
|
if no file provided, unable to read file, or datasource query parameter is missing |
curl 'https://data.lucid.app/dataSources/2967' \
--request 'PATCH' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
-- data-raw '{
"name": "New Data Source",
"adapterType": "DATA_API"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/dataSources/2967",
"name": "New Data Source",
"product": "chart",
"sourceGrants": "https://data.lucid.app/sourceGrants?dataSource=https://data.lucid.app/dataSources/2967",
"adapterType": "DATA_API",
"collections": "https://data.lucid.app/collections?dataSource=https://data.lucid.app/dataSources/2967",
"items": "https://data.lucid.app/dataSources/2967/items",
"linkParameters": {},
"created": "2018-08-08T21:26:03Z",
"lastModified": "2019-12-10T17:24:56Z",
"deleted": null,
"pending": false,
"dataSet": null
}
This endpoint takes a JSON object and uses it to update the data source's name and/or adapter type. The JSON object of the updated data source is returned. Updates will only occur if the user has access to the data source.
|
ID of data source to be updated. |
|
New name for the data source being updated. |
|
New adapter type for the data source being updated. |
|
with Data Source |
curl 'https://data.lucid.app/dataSources/123' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Length: 0
This removes the specified data source and anything related to it (collections, schema, items, link parameters). Once deleted, none of the information can be recovered.
|
ID of data source to be deleted. |
|
Each data source must have one or more associated source grant(s). The source grants' purpose is to specify the authorization level of the data source for a user trying to access it. Each source grant consists of an access level, a permission type, and an identifier string saying which user, account or document the permission belongs to.
These endpoints are responsible for creating and deleting data source grants. The available endpoints are outlined below. Each endpoint takes optional access tokens to determine access to the requested resource. A user can create and delete data source grants only if they have appropriate access.
Bob uploads a Google Sheets document using the Data API, attaches a data source to a Lucidchart document, and shares the Lucidchart document with a coworker (Alice) who is on the same Lucid account. Alice is able to see the data already on the Lucidchart document as well as any updates or refreshes to the data that Bob makes. However, she cannot refresh the data herself. Next, Bob creates a new "account" level source grant for his data source. Because Alice and Bob are coworkers on the same company account, Alice is now able to refresh the data on the Lucidchart document and see changes as the Google Sheets document gets updated. The added "account" level source grant allows Alice to update the data in the Lucidchart document because she is on the same company account as Bob.
Bob uploads a Google Sheets document using the Data API, attaches a data source to a document, and shares the document with a consultant (Carol). Carol does not belong to the same Lucidchart account as Bob. Carol is able to see the data already on the Lucidchart document, but she cannot refresh the data or see any changes made to the Google Sheets document. Bob creates a new "document" level source grant. Carol is now able to refresh the data on the Lucidchart document and see changes as the Google Sheets document gets updated.
{
"uri": "https://data.lucid.app/sourceGrants/8",
"dataSource": "https://data.lucid.app/dataSources/435",
"permissionType": "user",
"identifier": "5678",
"role": "edit"
}
Property | Description |
---|---|
|
URI Link to get self |
|
URI Link to get data source |
|
String Permission type granted. "user": This permission grants access to individual users if their Lucid id is equal to the grant's identifier string. "account": This permission grants access to every user on the account specified by the grant's identifier string. "document": This permission grants access to anyone who has access to the document referenced in the grant value, even if they are not a user on the associated Lucid account. Note that the kind of access a user has to a particular document affects the permissions granted by a data source grant through that document. In particular, if a user has read-only permissions on a particular document, any data source grant through that document will give them at most the 'view' access level, regardless of the access level listed on the data source grant itself. |
|
String The document id, account id, or user id matching the permission type |
|
String Available types are: "edit" and "view" |
curl 'https://data.lucid.app/sourceGrants/1' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/sourceGrants/1",
"dataSource": "https://data.lucid.app/dataSources/1",
"permissionType": "user",
"identifier": "9999",
"role": "view"
}
Gets the requested data source grant if the access tokens are valid and the user has access to the data source. Note that the id in the URI is the number at the end of the data source grant's URI, not the identifier field of the object.
|
ID of data source grant to be retrieved |
|
with Data Source Grant |
curl 'https://data.lucid.app/sourceGrants?dataSource=https://data.lucid.app/dataSets/435' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"uri": "https://data.lucid.app/sourceGrants/8",
"dataSource": "https://data.lucid.app/dataSources/1",
"permissionType": "account",
"identifier": "1234",
"role": "edit"
},
{
"uri": "https://data.lucid.app/sourceGrants/1",
"dataSource": "https://data.lucid.app/dataSources/1",
"permissionType": "user",
"identifier": "9999",
"role": "view"
}
]
Finds and returns all data source grants for the queried data source if the user has access to the data source.
|
Data source to find all grants for. |
|
with Array[Data Source Grant] |
curl 'https://data.lucid.app/sourceGrants' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"dataSet": "https://data.lucid.app/dataSets/435",
"permissionType": "user",
"identifier": "9999",
"role": "view"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"dataSet": "https://data.lucid.app/dataSets/435",
"permissionType": "user",
"identifier": "9999",
"role": "view"
}
Creates a new data source grant for the specified data source. The requesting user must have access to the data source in order for it to succeed.
Creates a new data source grant for the specified data source. The requesting user must have access to the data source in order for it to succeed.
|
Data set to add grant to. |
|
Type of permission being given. Valid values are "account", "document" or "user". |
|
Identifier for permission type. |
|
Role being given. Valid values are "view" and "edit". |
|
with Data Source Grant |
curl 'https://data.lucid.app/sourceGrants/26' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Length: 0
Removes the specified data source grant ONLY if it's not the last data source grant. There must always be at least one data source grant for a given data source, therefore the last data source grant cannot be deleted. A response message is returned with the result of the deletion. Note that the id in the URI is the number at the end of the data source grant's URI, not the identifier field of the Data Source Grant.
|
ID of data source grant to be deleted |
|
A collection is a container inside of a data source. A data source can have many collections, but a collection can only belong to one data source. A collection can be thought of as a tab or individual sheet in a spreadsheet file. In the case of a CSV file, there would only be a single collection. Each collection contains a schema, items, collection properties, and metadata collections.
The collection endpoints are responsible for creating, updating, and deleting collections. The individual endpoints are outlined below. Each endpoint takes optional access tokens to determine access to the requested collection. A user can only modify collections if they have access to the data source.
{
"uri": "https://data.lucid.app/collections/3",
"dataSource": "https://data.lucid.app/dataSources/1",
"name": "Some New Collection",
"lastSync": "2018-03-28T14:48:45Z",
"versionTimestamp": "2019-12-13T22:40:54Z",
"created": "2018-03-23T17:34:31Z",
"lastModified": "2018-03-28T14:48:44Z",
"items": "https://data.lucid.app/collections/3/items",
"schema": "https://data.lucid.app/collections/3/schema",
"properties": "https://data.lucid.app/collections/3/properties",
"metadata": "https://data.lucid.app/collections/3/metadata",
"metadataType": null,
"parent": null,
"syncStarted": null,
"deleted": null
}
Property | Description |
---|---|
|
URI Link to get self |
|
URI Link to get parent data source |
|
String Name of collection |
|
DateTime Timestamp of the last time the collection was synced with upstream source |
|
DateTime Timestamp of the last time the collection, the collection's schema, the collection's contents, one of its collection properties, or anything in any of its metadata collections was changed. It can be used to tell if a copy of the data is out of date and needs to be refreshed. |
|
DateTime Timestamp of when this collection was created |
|
DateTime Timestamp of when this collection was last modified |
|
URI Link to get associated items |
|
URI Link to get associated schema |
|
URI Link to get associated properties |
|
URI Link to get associated metadata collections |
|
String |
|
URI |
|
DateTime |
|
DateTime |
{
"collections": [Collection, Collection, ...],
"total": 125,
"prev": "https://data.lucid.app/collections?start=80&end=90",
"next": "https://data.lucid.app/collections?start=100&end=110"
}
Property | Description |
---|---|
|
Array[Collection] Array of collections |
|
Number Total number of existing collections |
|
URI Link to get the previous list of collections |
|
URI Link to get the next list of collections |
curl 'https://data.lucid.app/collections' \
--request 'HEAD' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
lucid-collections-total: 123
Content-Length: 0
This endpoint returns the number of collections a user has access to. The return value is in the response headers as
|
with |
curl 'https://data.lucid.app/collections/3' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/collections/3",
"dataSource": "https://data.lucid.app/dataSources/1",
"name": "Some New Collection",
"lastSync": "2018-03-28T14:48:45Z",
"versionTimestamp": "2019-12-13T22:40:54Z",
"created": "2018-03-23T17:34:31Z",
"lastModified": "2018-03-28T14:48:44Z",
"items": "https://data.lucid.app/collections/3/items",
"schema": "https://data.lucid.app/collections/3/schema",
"properties": "https://data.lucid.app/collections/3/properties",
"metadata": "https://data.lucid.app/collections/3/metadata",
"metadataType": null,
"parent": null,
"syncStarted": null,
"deleted": null
}
Gets a specific existing collection from Lucid.
|
ID of collection to be retrieved |
|
with Collection |
curl 'https://data.lucid.app/collections?start=1&end=100' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"collections": [Collection, Collection, ...],
"total": 125,
"prev": "https://data.lucid.app/collections?start=80&end=90",
"next": "https://data.lucid.app/collections?start=100&end=110"
}
]
This endpoint returns all collections that the user has access to. The results will be paginated. If the number of collections exceeds the pagination limit, links will be provided to get the next set of results or the previous set of results (if applicable). The range of returned values can be determined by optional start and end parameters. If the difference between the end and start values is greater than the pagination limit, the endpoint returns collections in the range from start to start + pagination limit. Items in the response are determined based on their creation order.
|
Starting 1-based index of collections to retreive. Defaults to 1. |
|
Ending index of collections to retreive. Defaults to 1000. |
|
with paginated list of Collections |
curl 'https://data.lucid.app/collections' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"dataSource": "https://data.lucid.app/dataSources/1",
"name": "Some New Collection",
"schema": [{"name": "Employee ID", "fieldType": "STRING", "order": 1}],
"properties": {"fontSize": "12"}
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/collections/1",
"dataSource": "https://data.lucid.app/dataSources/1",
"name": "Some New Collection",
"lastSync": "2018-03-28T14:48:45Z",
"versionTimestamp": "2019-12-13T22:40:54Z",
"created": "2018-03-23T17:34:31Z",
"lastModified": "2018-03-28T14:48:44Z",
"items": "https://data.lucid.app/collections/3/items",
"schema": "https://data.lucid.app/collections/3/schema",
"properties": "https://data.lucid.app/collections/3/properties",
"metadata": "https://data.lucid.app/collections/3/metadata",
"metadataType": null,
"parent": null,
"syncStarted": null,
"deleted": null
}
Creates a new collection for the specified data source. Only succeeds if the user has access to the data source.
|
URI of data source that the collection should be added to |
|
Name to give to new collection |
|
The schema field takes an array of Field Definition objects. |
|
The properties field is used to store a string mapping of properties to be used by the client. An empty object can be provided. |
|
with Collection |
curl 'https://data.lucid.app/collections/5' \
--request 'PATCH' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"dataSource": "https://data.lucid.app/dataSources/12",
"name": "Collection With New Name"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/collections/5",
"dataSource": "https://data.lucid.app/dataSources/12",
"name": "Collection With New Name",
"lastSync": "2018-03-28T14:48:45Z",
"versionTimestamp": "2019-12-13T22:40:54Z",
"created": "2018-03-23T17:34:31Z",
"lastModified": "2018-03-28T14:48:44Z",
"items": "https://data.lucid.app/collections/3/items",
"schema": "https://data.lucid.app/collections/3/schema",
"properties": "https://data.lucid.app/collections/3/properties",
"metadata": "https://data.lucid.app/collections/3/metadata",
"metadataType": null,
"parent": null,
"syncStarted": null,
"deleted": null
}
This endpoint takes a JSON object and uses it to update the collection's name and/or data source. The JSON object of the updated collection is returned. Updates will only occur if the user has access to the data source. Only top level collections can be updated. Metadata collections cannot be updated.
|
ID of collection to be updated |
|
URI of data source that the collection should be moved to be a part of |
|
Updated name to give to collection |
|
with Collection |
curl 'https://data.lucid.app/collections/3' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Length: 0
This removes the collection and anything that belongs to it (metadata collections, schema, and items). Data sources will not be removed. This action cannot be undone and will only occur if the user has access to the data source.
|
ID of collection to be deleted |
|
curl 'https://data.lucid.app/collections/1232/metadata' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"uri": "https://data.lucid.app/collections/1232",
"dataSource": "https://data.lucid.app/dataSources/1",
"name": "Some New Collection",
"lastSync": "2018-03-28T14:48:45Z",
"versionTimestamp": "2019-12-13T22:40:54Z",
"created": "2018-03-23T17:34:31Z",
"lastModified": "2018-03-28T14:48:44Z",
"items": "https://data.lucid.app/collections/1232/items",
"schema": "https://data.lucid.app/collections/1232/schema",
"properties": "https://data.lucid.app/collections/1232/properties",
"metadata": "https://data.lucid.app/collections/1232/metadata",
"metadataType": null,
"parent": null,
"syncStarted": null,
"deleted": null
}
]
This endpoint returns a list of Collections for any metadata collections that exist on the requested collection. The return will only occur if the user has access to the data source. Each metadata collection will have a link to its parent collection in the parent field.
|
ID of collection |
|
with list of Collections |
curl 'https://data.lucid.app/collections/123/metadata' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1' \
--data-row '{
"name": "Reports 2020",
"metadataType": "TextColor",
"schema": [
{
"name": "Name",
"fieldType": "STRING",
"order": 1
}
],
"properties": {
"backgroundColor": "green",
"fontSize": "12"
}
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/collections/123",
"dataSource": "https://data.lucid.app/dataSources/1",
"name": "Reports 2020",
"lastSync": "2018-03-28T14:48:45Z",
"versionTimestamp": "2019-12-13T22:40:54Z",
"created": "2018-03-23T17:34:31Z",
"lastModified": "2018-03-28T14:48:44Z",
"items": "https://data.lucid.app/collections/123/items",
"schema": "https://data.lucid.app/collections/123/schema",
"properties": "https://data.lucid.app/collections/123/properties",
"metadata": "https://data.lucid.app/collections/123/metadata",
"metadataType": null,
"parent": null,
"syncStarted": null,
"deleted": null
}
Create a new metadata collection for a given collection. The user must have access to the data source in order to create a metadata collection. Metadata collections cannot be updated.
|
ID of collection to add metadata collection to |
|
Name to give to new collection |
|
Type of metadata this collection contains |
|
The schema field takes an array of Field Definition objects. |
|
The properties field is used to store a string mapping of properties to be used by the client. An empty object can be provided. |
|
with Collection |
Collections can have properties that can describe the collection as a whole. Some of these properties are predefined, meaning that either the Data API or the client will automatically read and interpret them in ways already determined by Lucid. However, the Data API itself does not limit which properties may be created or used, and third-party applications can use any unused properties to tag collections for any purpose.
The collection property endpoints are responsible for the creation, deletion, and updating of properties associated with a collection. The available endpoints are outlined below. A user can modify properties on a collection if they have access to the parent data source.
curl 'https://data.lucid.app/collections/435/properties' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"backgroundColor": "blue",
"font": "Times New Roman"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"backgroundColor": "blue",
"font": "Times New Roman"
}
Gets all properties for the specified collection if the user has access to the data source.
|
ID of collection to get properties for |
|
with Map[String,JsValue] of properties on the specified collection |
curl 'https://data.lucid.app/collections/184/properties' \
--request 'PATCH' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"backgroundColor": "blue",
"font": "Times New Roman"
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"backgroundColor": "blue",
"font": "Times New Roman"
}
Allows a user to update the properties on a collection. This endpoint uses the supplied values to either update existing properties or add new properties.
|
ID of collection to update properties for |
|
Properties to update or add to specified collection |
|
with list of properties that were affected |
curl 'https://data.lucid.app/collections/435/properties?properties=property1,property2' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Length: 0
Removes only the properties provided in the query parameter. The deleted properties cannot be undone. The deletion will only occur if the user has access to the collection.
|
ID of collection for properties to be deleted from |
|
List of property names to remove from specified collection. |
|
Each collection has one schema which describes the content of the collection. You can think of the schema as a header row in a spreadsheet. The schema is made up of field definitions.
Each field holds a value and can be thought of as a single cell in a spreadsheet. An item can have many fields, but a field can only belong to one item.
Each field definition describes the name and type (string, number, boolean, etc) of the field. It also specifies whether or not the field is a primary key, the order in the primary key if it is a primary key, and the default value for the field. The name of the field can be thought of as the column name in a spreadsheet. Primary keys act as identifiers for the items they belong to. If an item's field value is not specified, the default value from the field definition will be used.
For example, suppose you want to store the following snippet from a spreadsheet:
First Name | Phone Number | Over 18 | |
---|---|---|---|
1 | Bob | 1234567890 | true |
2 | Alice | 4567890123 | true |
3 | Carol | 7891234560 | false |
The schema would have three field definitions, one for each column. The first field definition's name would be "First Name". The type would be "string". The "First Name" field is not the primary key since the unique identifier in this case is the "Phone Number". The second field definition's name would be "Phone Number". The type would be "number". It is a primary key, because it is a unique value that can be used to identify each item. The third field definition's name is "Over 18" with a type of "boolean".
The schema endpoints are responsible for the creation, deletion, and updating of field definitions within a schema. A user can only modify field definitions if they have access to the data source.
{
"uri": "https://data.lucid.app/collections/2/schema/4",
"name": "ColB",
"fieldType": "NUMBER",
"collection": "https://data.lucid.app/collections/2",
"isPrimary": false,
"order": 1,
"default": "5",
"label": null
}
Property | Description |
---|---|
|
URI Link to get self |
|
String Name of field |
|
String Stores the type of the field. The type does not affect how the data is interpreted in the Data Service; it is for use on the client side. Some valid values are: BOOLEAN, STRING, NUMBER, and ANY. |
|
URI Link to get associated collection |
|
Boolean Denotes whether the specified field is part of the primary key. The default value is false. |
|
String |
|
String |
|
String |
curl 'https://data.lucid.app/collections/2/schema/4' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/collections/2/schema/4",
"name": "colA",
"fieldType": "STRING",
"collection": "https://data.lucid.app/collections/2",
"isPrimary": false,
"order": 2,
"default": "foo"
}
Gets a specific existing field definition for a given collection
|
ID of collection schema belongs to |
|
ID of field definition to retrieve |
|
with Field Definition |
curl 'https://data.lucid.app/collections/2/schema' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json'
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"uri": "https://data.lucid.app/collections/1/schema/1",
"name": "colA",
"fieldType": "STRING",
"collection": "https://data.lucid.app/collections/1",
"isPrimary": false,
"order": 2,
"default": "foo"
},
{
"uri": "https://data.lucid.app/collections/1/schema/2",
"name": "colB",
"fieldType": "NUMBER",
"collection": "https://data.lucid.app/collections/1",
"isPrimary": true,
"order": 1,
"default": null
}
]
This endpoint returns all field definitions for a given collection if the user has access
|
ID of collection schema belongs to |
|
with Array[Field Definition] |
curl 'https://data.lucid.app/collections/5/schema' \
--request 'PATCH' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '[
{
"uri": "https://data.lucid.app/collections/5/schema/1",
"name": "colFirst",
"fieldType": "STRING",
"collection": "https://data.lucid.app/collections/5",
"isPrimary": false,
"order": 2,
"default": "foo"
}
]
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"uri": "https://data.lucid.app/collections/5/schema/1",
"name": "colFirst",
"fieldType": "STRING",
"collection": "https://data.lucid.app/collections/5",
"isPrimary": false,
"order": 2,
"default": "foo"
}
]
This endpoint allows updating multiple field definitions at once. The easiest way to accomplish this is to modify the values in the response from the get all field definitions endpoint and send a PATCH request. Changing the values will update existing field definitions within the collection's schema. Any fields sent without a uri field will result in an addition to the schema if the name field is unique within the schema. Fields cannot be deleted with this endpoint.
|
ID of collection schema to be updated |
|
|
|
with Array[Field Definition] containing new or updated fields on the collection. |
curl 'https://data.lucid.app/collections/5/schema/3' \
--request 'PATCH' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"name": "updated col name",
"fieldType": "STRING",
"isPrimary": false,
"order": 2,
"default": "foo"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/collections/5/schema/3",
"name": "updated col name",
"fieldType": "STRING",
"collection": "https://data.lucid.app/collections/5"
}
This endpoint takes a Field Definition, which is used to update the specified field definition. The easiest way to accomplish this is to modify the values in the response from the GET field definition endpoint and send a PATCH request.
|
ID of collection schema to be updated |
|
ID of specific field within the schema to be updated |
|
|
|
with Field Definition containing new or updated fields. |
curl 'https://data.lucid.app/collections/2/schema?fields=/collections/2/schema/1,/collections/2/schema/2' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Length: 0
This endpoint removes only the field definitions provided in the query parameter. The fields in the query parameter must belong to the collection specified. The results of this deletion cannot be undone. The deletion will only occur if the user has access to the data source.
|
ID of collection schema belongs to |
|
Specific field defininitions to remove from collection's schema |
|
curl 'https://data.lucid.app/collections/2/schema/4' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Length: 0
This removes the field definition from the collection's schema. This results of this action cannot be undone. The delete will only occur if the user has access to the data source. This action will also remove all data item values associated with the deleted field.
|
ID of collection schema belongs to |
|
ID of field definition to delete |
|
An item is a container inside of a collection and can be thought of as a single row in a spreadsheet. A collection can have many items, but an item can only belong to one collection. Each item is made up of fields.
Each data item consists of its URI, collection, and a list of fields. The fields consist of a mapping from schema field names to data item values. Each field name corresponds to a matching field in the collection's schema. If a data item has not been given a specific value for each schema field, the value will either be the default on the schema field or null.
The data item endpoints are responsible for the creation, deletion, and updating of data items within a collection. The actions are outlined below. A user can modify data items if they have access to the data source.
{
"uri": "https://data.lucid.app/collections/1009534/items/46",
"collection": "https://data.lucid.app/collections/1009534",
"fields": {
"A": "This is the original version",
"B": "123.0",
"C": "5.0"
}
}
Property | Description |
---|---|
|
URI Link to get self |
|
URI Link to get collection the item belongs to |
|
Object Mapping of field names found in schema to this specific item's values |
{
"fieldValues": ["Joey", "Ontario"]
}
Property | Description |
---|---|
|
Array[String] Specifies the actual value that the fields need to have to be found. |
{
"fieldValues": ["Rowland"],
"patch": {
"First Name": "Jordan",
"Last Name": "Haron"
}
}
Property | Description |
---|---|
|
Array[String] Specifies the actual value that the fields need to have to be found. |
|
Map[String, Optional[String]] List of field names with the new value that the field should be set to. Changes will be applied to any matching items and if the value is null, that field will be deleted from the matching data items. |
{
"items": [Data Item, Data Item, ...],
"total": 125,
"prev": "https://data.lucid.app/collections/44/items?start=80&end=90",
"next": "https://data.lucid.app/collections/44/items?start=100&end=110"
}
Property | Description |
---|---|
|
Array[Data Item] Array of data items |
|
Number Total number of existing data items |
|
URI Link to get the previous list of data items |
|
URI Link to get the next list of data items |
curl 'https://data.lucid.app/collections/3/items' \
--request 'HEAD' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1' \
HTTP/1.1 200 OK
Lucid-Items-Total: 17
This endpoint returns the number of data items a user has access to. The return value is in the response headers as
|
ID of collection items belong to |
|
curl 'https://data.lucid.app/collections/3/items/1' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/collections/3/items/1",
"collection": "https://data.lucid.app/collections/3",
"fields": {
"A": "This is the original version",
"B": "123.0",
"C": "5.0"
}
}
Gets a specific existing data item from a given collection
|
ID of collection schema belongs to |
|
ID of data item to retrieve |
|
with Data Item |
curl 'https://data.lucid.app/collections/44/items?start=1&end=100&end=age%20%3E%2016' \
--request 'GET' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Type: application/json
{
"items": [Data Item, Data Item, ...],
"total": 125,
"prev": "https://data.lucid.app/collections/44/items?start=80&end=90",
"next": "https://data.lucid.app/collections/44/items?start=100&end=110"
}
This endpoint returns all data items within a collection that the user has access to. The results will be paginated. If the number of data items exceeds the pagination limit, links will be provided to get the next set of results or the previous set of results (if applicable). The range of returned values can be determined by optional start and end parameters. If the difference between the end and start values is greater than the pagination limit, the endpoint returns collections in the range from start to start + pagination limit. Items in the response are determined based on their creation order.
This endpoint also supports an optional filter string that can be used to filter down the data items returned based off the items' fields' values. If a filter is included, the start and end parameters only refer to items which satisfy the filter; this is also true of the total value in the response. For more details, see Data Item Filters.
|
ID of collection items belong to |
|
Starting 1-based index of data items to retreive. Defaults to 1. |
|
Ending index of data items to retreive. Defaults to 10000. |
|
Url-encoded filter string. Example unencoded is |
|
with paginated list of Data Items |
curl 'https://data.lucid.app/collections/44/items/1?start=1&end=100' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-row '{
"targetValues": [{"fieldValues": ["Joey", "Ontario"]}],
"keySchemaFields": ["first name", "last name"]
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"items": [Data Item, Data Item, ...],
"total": 125,
"prev": "https://data.lucid.app/collections/44/items?start=80&end=90",
"next": "https://data.lucid.app/collections/44/items?start=100&end=110"
}
Returns all data items in the specified collection whose field values match the values specified in a Data Item By Key Find JSON Object. If necessary, you can paginate this endpoint's results using query parameters.
|
ID of collection schema belongs to |
|
ID of data item to retrieve |
|
Starting 1-based index of data items to retreive. Defaults to 1. |
|
Ending index of data items to retreive. Defaults to 10000. |
|
List of parameters by which to search for data items. |
|
Fields used to search for items in the collection. If it is not provided, primary keys from the schema are used. |
|
with paginated list of Data Items |
curl 'https://data.lucid.app/collections/123/items' \
--request 'POST' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '[
{
"ColA": "a value",
"ColB": "b value"
}
]'
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"items": [Data Item, Data Item, ...],
"total": 125,
"prev": "https://data.lucid.app/collections/123/items?start=80&end=90",
"next": "https://data.lucid.app/collections/123/items?start=100&end=110"
}
]
If the user has access to the collection, new data items are created using the supplied values. Primary key constraints are not enforced. Any field name that is not part of the schema definition is ignored by default. The schema should be created prior to any data items being created.
|
ID of collection to add data items to |
|
|
|
with Array[Data Item] |
curl 'https://data.lucid.app/collections/5/items/2' \
--request 'PATCH' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"uri": "https://data.lucidchart.com/collections/22/items/3",
"fields": {
"ColA": "new a value",
"ColB": null
}
}'
HTTP/1.1 200 OK
Content-Type: application/json
{
"uri": "https://data.lucid.app/collections/22/items/3",
"collection": "https://data.lucid.app/collections/22",
"fields": {
"ColA": "new a value",
"ColB": null
}
}
Update values for the specified item. The easiest way to accomplish is to modify the values in the response from Get Data Item and send a PATCH request. Changing the values will update existing data item values. The collection field is ignored as the data item cannot be moved to a different collection. It the new value is null, it means the value is deleted. If the provided field name does not exist in the collection schema, that value is ignored.
|
ID of collection for data item to be updated in |
|
ID of data item to be updated |
|
URI of data item to be updated |
|
Field value pairs to update data items from. Mapping is for a single data item. |
|
with Data Item |
curl 'https://data.lucid.app/collections/5/items' \
--request 'PATCH' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '[
{
"uri": "https://data.lucidchart.com/collections/22/items/3",
"fields": {
"ColA": "new a value",
"ColB": null
}
}
]'
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"uri": "https://data.lucidchart.com/collections/22/items/3",
"fields": {
"ColA": "new a value",
"ColB": null
}
}
]
This endpoint allows updating multiple data items at once. The easiest way to accomplish is to modify the values in the response from Get All Data Items and send a PATCH request. Changing the values will update existing data item values. The collection field is ignored as the data item cannot be moved to a different collection. It the new value is null, it means the value is deleted. If the provided field name does not exist in the collection schema, that value is ignored.
|
ID of collection for data items to be updated in |
|
URI of data item to be updated |
|
Field value pairs to update data items from. Mapping is for a single data item. |
|
with Array[Data Item] |
curl 'https://data.lucid.app/collections/5/itemsByKey' \
--request 'PATCH' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"patches": [
{
"fieldValues": ["Alex", "Rowland"],
"patch": {
"First Name": "Jordan",
"Last Name": "Haron"
}
}
],
"keySchemaFields": ["Last Name"]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
Message: "Updated 1 item(s)"
}
Find any data items whose fields match specified values and update those items using a patch. If the value of a field in a patch is null, that value will be deleted from the item. If the provided field name does not exist in the collection schema, that value is ignored. Attempts to update the Collection field will be ignored as a data item cannot be moved to a different collection.
|
ID of collection for data item to be updated in |
|
Define what items from the collection you are changing and how to change them. The order of strings in |
|
Fields used to search for items in the collection. If it is not provided, primary keys from the schema are used. |
|
with message indicating the number of items updated. Ex: "Updated 1 item(s)" |
curl 'https://data.lucid.app/collections/3/items/1' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Length: 0
Removes the specified data item from the collection. This deletion cannot be undone. The deletion will only occur if the user has access to the data source.
|
ID of collection item belongs to |
|
ID of data item to delete |
|
curl 'https://data.lucid.app/collections/3/items=/collections/2/items/5,/collections/2/items/6' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
HTTP/1.1 200 OK
Content-Length: 0
Removes only the data items provided in the query parameter. The data items in the query parameter must belong to the collection specified. The deletion cannot be undone. The deletion will only occur if the user has access to the data source.
|
ID of collection item belongs to |
|
List of data items to delete from collection |
|
curl 'https://data.lucid.app/collections/3/itemsByKey' \
--request 'DELETE' \
--header 'Authorization: Bearer <OAuth Access Token>' \
--header 'Accept: application/json;v=1'
--data-raw '{
"targetValues": [{ "fieldValues": ["Joey", "Ontario"]}],
"keySchemaFields": ["first name", "last name"]
}
HTTP/1.1 200 OK
Content-Length: 0
Finds all the items whose key values match those specified by the payload and deletes them. The deletion cannot be undone. The deletion will only occur if the user has access to the data source.
|
ID of collection item belongs to |
|
Defines what items within the collection you are searching for. The order of strings in |
|
Fields used to search for items in the collection. If it is not provided, primary keys from the schema are used. |
|
The data item filter is a query string that is optionally available on the Get All Data Items endpoint. Its purpose is to allow you to limit which items you get from the Data API. This section covers its syntax and limitations.
The central component of the item filter expression is the comparison. By itself, a comparison is the simplest valid filter. All comparisons are strictly of the form
If the name of the field you are filtering on contains spaces or other special characters, you can wrap the field name in any of the three simple quotation marks: " or ' or `. Thus the string
There are 8 operators you can use in your comparisons:
Operator | Valid Constant Type | Notes |
---|---|---|
= | String, Number | Equality works well with strings and with integer numbers. Floating-point numbers here and in general have difficulties with equality. This is a very involved problem, so if you are having trouble with it we suggest looking up specialized resources elsewhere. |
!= | String, Number | Note that = and != are only inverses over field values which are considered comparable to the constant, as outlined in the section below. |
> | String, Number | |
>= | String, Number | |
< | String, Number | |
<= | String, Number | |
IN | String, Number, Array[String] | If the constant is either a string or number, it is treated as an array of strings or numbers that has a single element. |
CONTAINS | String, Number | The data item will be split by comma seperator, and checked to see if any one of the children is the same as the constant. |
All string comparisons are case-insensitive.
For all operators, the value of the field must be considered comparable with the constant in order for the result to be true. For instance, when the constant is a number, the fields are coerced to a number before the comparison is performed. If the field cannot be coerced to a number, the result of the comparison is false. This means, for instance, that a field with value "0.0" is equal to the numeric constant 0 but not the string constant "0". This also means that a field with value "a" will return false for both "a" = 0 and "a" != 0 because "a" cannot be coerced to a number. Similarly, if the constant is an array of strings, the comparison can evaluate to true only if the operator involved is IN; all other operators combined with an array constant are automatically false.
A constant can be either a quoted string, a number, or an array of strings.
A constant is a string if the constant is wrapped in any of the simple quotation marks (" or ' or `). As with field names, to include quotation marks inside a quoted string, you can either use a different quote symbol or escape the quotation marks by doubling them in every desired location inside the string.
A constant is a number if it is not quoted, not inside parentheses, and can be parsed as a valid floating point number in Java.
A constant is an array of strings if it is a comma-separated list of strings wrapped inside a pair of parentheses. Arrays only evaluate when using the IN operator; any other operator used with an array of strings automatically evaluates to false. An example of a comparison using an array of strings is
Compound filters can be created from comparisons using the AND, OR and NOT operators, as outlined in the following table. You can use parentheses to group operations if the default precedence is not what you need.
Operator | Precedence | Effect |
---|---|---|
NOT | Highest | Invert the result of the filter immediately after this operator |
AND | Medium | The compound filter is only true if the filters before and after this operator are both true |
OR | Lowest | True if either the filter before or after this operator is true |
For example, if you want a match for all items with names that are not "Thomas" or "Susan", you could use the compound filter
For a more complex example of compound filters and their precedences, consider the following filter:
age > 21 AND NOT last_name in ("Smith", "Wesson") OR as_adult = "true"
This filter will return every item from the collection that has the field as_adult set to the value "true". It will also return every item which has an age greater than 21 and whose last_name is not either "Smith" or "Wesson". If there are any items which satisfy both of these conditions, they will be included in the results, but only once. This is equivalent to the filter
((age > 21 AND (NOT last_name in ("Smith", "Wesson"))) OR as_adult = "true")
but different from the filter
age > 21 AND (NOT last_name in ("Smith", "Wesson") OR as_adult = "true")
This last filter will only return items which have an age greater than 21, but only if they have as_adult equal to "true" or if their last_name is anything besides "Smith" or "Wesson".
The full syntax for the filter string is given by the following definitions:
filter = comparison | composite filter
comparison = fieldname operator constant
fieldname = identifier | quotedstring
identifier = a sequence of non-whitespace chars
quotedstring = ("|'|`)
(both of the outer quotes must be the same symbol)
operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'IN'
constant = stringconstant | numberconstant | stringarray
stringco