Find Duplicates (by checksum)
GET/api/v1/assets/:asset_id/content/original/duplicates
Retrieve duplicates of an asset original file by checking for the Asset file's MD5 checksum.
Note: This API will identify duplicates even if the original file name of assets are different.
Only exact copies match: a resized, re-encoded or re-saved file has a different checksum and is not a duplicate. The search uses the caller's normal scope (their group's assets, or only their own uploads when group asset access is off), and assets in the trash are left out. The asset itself is never in its own duplicates list. An asset without a checksum (for example one still being processed) returns an empty list.
Results come 30 to a page. This returns page 1; use GET /api/v1/assets/{asset_id}/content/original/duplicates/{page} for the others. The asset itself is counted for paging and then left out, so the page it falls on holds one id fewer.
RESPONSE JSON
Example response
{
"id": "99d819953914402babbdeb68337ea6a3",
"name": "example.jpg",
"size": 8836363,
"content_type": "image/jpeg",
"checksum": "5f5f26bd7c0f62c6e02e44c73d09734e",
"total_files": 2,
"total_pages": 1,
"page": 1,
"duplicates": [
"425f6a2a266d45d58d067f7c39a2e4bd",
"a563da2a266d45d58d067b8c39a3d5ad"
]
}
| Key | Value | Description |
|---|---|---|
id | string | File's unique ID, 32 character alphanumeric UUID |
name | string | File name |
size | integer | Size of file in bytes |
checksum | string | MD5 checksum |
content_type | string | MIME type |
duplicates | JSON | List of file ids whose MD5 checksum is the same as the asset id. Defaults to 30 duplicates per page. The actual count returned may vary depending on asset activity at the time the API is called. |
total_files | integer | Number of duplicate files found, not counting the asset itself |
total_pages | integer | Number of pages in result. |
page | integer | Current page of the result. Defaults to 1. |
Request
Responses
- 200
- 401
- 403
- 404
- 500
Successful operation
Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions
Asset not found
Internal server error