Hello Can,
a manual duplicate check can be done either via the REST-WS API or via the Search-Service API as follows:
REST WS API:
- Create the SHA-256 digest of the file (SHA-256 is the default, if something else is configured, this algorithm must be used)
- Call the REST-WS API endpoint ResultService.getEsqlResult (/result/raw) with the following ESQL - replacing it with the determined digest:
SELECT doc.sysitemid,typeqname(doc) FROM dms:sysdocument doc WHERE sysboxid
IN(
select [b2n].sysid1
from
[dps]:[sysbox2actualnode] [b2n]
join
[dps]:[sysactualnode] [n]
join
[dps]:[sysactualnode2nodeelement] [n2e]
join [dps]:[sysnodeelement] [e]
WHERE [e].sysdigest='<SHA-256-Digest>'
)
SEARCH-SERVICE API:
- Create the SHA-256 digest of the file (SHA-256 is the default, if something else is configured, this algorithm must be used)
- Call the search service API /search with the following body - replacing <SHA-256-Digest> with the determined digest:
{"filters":{"digest":{"o":"eq","v1":"<SHA-256-Digest> [SHA-256]"}}}
This search is much faster - but has one disadvantage: It only returns results if the document is already indexed. When creating a new object - if immediate indexing is not activated - then it can take some time (depending on the system load) - until the object is also found in the index.
For API description - see here:
https://yuuvisdevelop.atlassian.net/wiki/spaces/onpremise/pages/319620127/Search Service API
VG
Nicolai