Alongside upload functionality, Uploadcare provides additional methods for managing already uploaded files with its REST API. Organize your files further by tagging them, creating new file versions, making decisions based on file info, and running heavy tasks in the background.
Our REST API is documented in the OpenAPI 3 format. We’ll provide links to the respective operations along this guide.
Basic building blocks of our API:
Here is a basic example of a CRUD operation: retrieving the list of files.
You can learn about uploading files in the respective article. Everything else is down below.
You can list files in your project and get their info. File info provides you with insights into the content of the file. Based on the file information, you can decide to keep or delete it, create a modified copy, add metadata, or process it in other ways. Read down below about these features.
If you haven’t stored the file during uploading, you can store it afterwards to keep it from being removed after 24 hours. This might be the case if you look into file info before making a decision. This operation is possible for up to 100 files in one go.
You can also delete files anytime, also up to 100 in one go. Note, that the delete operation removes the file from storage but doesn’t invalidate the CDN cache. You can change cache duration or submit a support ticket to invalidate selected files.
Files are immutable, but you can make their local copies to create new file versions.
As for changing the file name, you can apply any name when delivering it.
Uploadcare can notify your application about certain events with webhooks. For example, you may need to add or update a record in your database when a new file has been uploaded, or copy it to the remote storage if it qualifies your criteria. Read more about webhooks.
Large file copying via POST /files/local_copy/ is limited.
For POST /files/local_copy/, if the source CDN URL includes image processing operations, the file size must not exceed 100 MB.
For full details and possible error responses, see the API reference:
A local copy is used when you want to create a version of the current file. For example, when you need to “bake in” changes to the image you made. Or when you receive a big video file and want to encode it in an efficient format and smaller size.
Remote copy is helpful when you need to manually copy selected files to your S3 bucket to establish a specific file workflow.
You can add additional, arbitrary key-value data associated with uploaded files. For example, you could store user IDs, order IDs, or tags. This is available both during and after. Read more about arbitrary file metadata.
We have articles about each of these operations:
You don’t have to code most of the low-level API interactions. We have high-level libraries for all popular platforms:
API methods mentioned above run our Dashboard files section, where you can view your files and perform such operations.
You can easily build your own dashboards. We have a few examples of how it can be done:
View your project analytics for the chosen period:
You can view detailed usage statistics for the following categories:
Detailed API logs are helpful for debugging purposes.