Skip to content

Find assets by the hash of the file

GET
/assets/management/v1/assets/by-hash
curl --request GET \
--url https://api.ebitex.io/assets/management/v1/assets/by-hash \
--header 'Authorization: Bearer <token>'

Looks up assets by the SHA-256 of the file they were first uploaded from, so a script can reuse an asset instead of uploading the same file again. Send hashes as 1 to 50 lowercase hexadecimal SHA-256 values separated by commas.

The hash is of the bytes you sent, before any processing: an image is re-encoded and an SVG is rebuilt when it is stored, so the hash of what you download will not match. A hash that no asset was uploaded from is simply missing from the answer. Assets uploaded in the app before this lookup existed have no hash and are never found; if two assets share one, the oldest is returned.

Videos and documents are not hashed.

Key: an Assets management key (assets.management.read or assets.management.write).

hashes
string

[{ "hash": "…", "assetId": "…", "kind": "image", "visibility": "private", "name": "…" }]

validation_failed: hashes is missing, names more than 50, or holds a value that is not a SHA-256 in hexadecimal.

missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.

payment_required: the organization’s subscription needs attention.

scope_denied: the key is not an Assets management key. permission_denied: a read key was used for a write. app_not_available: Assets is not enabled for the organization. origin_denied or ip_denied: the key was used from an origin or address outside its restrictions.

too_many_failed_authentications: too many bad keys from this address; rate_limited: too many requests from the organization. Retry-After says how long to wait.