General Workflow for Lightroom API
The usual workflow entails initiating one or more calls to our API to modify PNG, JPG, or other compatible image files and generate new renditions.
As you start incorporating the Lightroom API into your workflow, there are several factors to consider, as outlined below:
Supported input formats
All image formats compatible with Lightroom are likewise supported by the APIs. For a comprehensive list of these formats, please consult: https://helpx.adobe.com/lightroom-classic/help/supported-file-formats.html
Input and Output file storage
The Lightroom API works with any public or signed url. We have documented a few of the most common storage services and how to generate the urls programmatically.
AWS S3: Pre-signed GET/PUT URL. For more information about pre-signed urls on S3 you can go here. Here are some code samples that show you how to generate your pre-signed urls programmatically:
- Node.js
Please note that creating pre-signed urls for AWS S3 requires signature version S3V4, as demonstrated in the sample code. - Python
We also have a python application that provides a working example of how to call our api using assets stored in AWS S3.
Google Drive:: Signed GET/PUT URL. For more information on how to setup your Google drive account for access to creating a signed URL here. Here are some code samples for getting signed urls.
Azure: SAS (Shared Access Signature) for upload/download. For more information on how to generate a Shared Access Signature you can go here. Here are some code samples for generating a url with Shared Access Signature.
Dropbox: Temporary upload/download URLs. For more information on how to generate an upload/download you can go here. You can also create a file upload link for dropbox here.
Note : You can test to see if your public url or presigned url is working.
Run the curl command below to see if your input file path is working
Copied to your clipboardcurl -X GET <Your file path> --output <some-file.jpg>
If you are using a presigned url, put your file path within ""
Copied to your clipboardcurl -X GET "<Your file path>" --output <some-file.jpg>
Run the curl command below to see if your output file path is working
Copied to your clipboardcurl -X PUT <Your file path> -d <some-file.txt>
If you are using a presigned url, put your file path within ""
Copied to your clipboardcurl -X PUT "<Your file path>" -d <some-file.txt>
Current Limitations
There are a few limitations to the APIs you should be aware of ahead of time.
- Multi-part uploads and downloads are not yet supported.
- All the endpoints only support a single file input.
Retries
For increased reliability and stability we have added a retry mechanism for all API calls, and have some recommendations on how to handle these:
- The service will retry status codes of 429, 502, 503, 504 three times.
- You should only retry requests that have a 5xx response code. A 5xx error response indicates there was a problem processing the request on the server.
- You should implement an exponential back-off retry strategy with 3 retry attempts.
- You should not retry requests for any other response code.