yuuvis® RAD Q&A

0 votes
by (120 points)
edited by

Hello, everyone,

we have the following scenario:
Documents are transmitted to yuuvis via the REST API using a data extraction tool. It is quite possible that the same document comes in 1:1 again via the REST API. At this point we need the duplicate detection as with manual filing via the filing basket. We start a WF (approval process) with the documents. We want to make duplicates recognizable so that the user knows in the process that it is a document that already exists in the archive and has probably gone through a WF.

In summary, we also need the duplicate detection for manual document storage via REST API.

What possibilities do we have?

BR

1 Answer

0 votes
by (19.6k points)
edited by

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

Related questions

0 votes
1 answer
0 votes
1 answer
asked May 24, 2019 by viktoria (150 points)
0 votes
2 answers
0 votes
1 answer
0 votes
2 answers
...