Question:
I tried using the RDM Lookups API(request below), but I could only get a max of 1000 lookup types. The ‘_dbscan’ limit is set to a max of 1000. How do I get the remaining? How do I use ‘scrollId’ in the response?
POST https://{{rdm_uri}}/lookups/rdm_tenant_name/_dbscan?limit=100
Authorization: Bearer {{token}}
Answer:
You can get this information by two ways:
1. Use offset search instruction. (You can calculate offset by the formula: offset = limit * number_of_pack first pack has number 0 )
For example:
First pack:
GET: https://rdm.reltio.com/lookups/<TENANTID>?filter=equals(type,'AWARDS_CATEGORY')&sort=code&order=asc&limit=100&offset=0
Second pack:
GET: https://rdm.reltio.com/lookups/<TENANTID>?filter=equals(type,'AWARDS_CATEGORY')&sort=code&order=asc&limit=100&offset=100
2. Use dbscan instruction - to get values from the Datastore without filtering
For it execute following request (with empty body)
POST: https://rdm.reltio.com/lookups/<TENANTID>/_dbscan?filter=equals(type,'AWARDS_CATEGORY')&limit=100
BODY:
Get "scrollId" from the response and send it as a body to get next pack
For example
POST: https://rdm.reltio.com/lookups/<TENANTID>/_dbscan?filter=equals(type,'AWARDS_CATEGORY')&limit=100
BODY:
CpEBEooBag1wfnByb2QtMTU1NDIycmILEhB....ZW50DKIBFERBVEFfQ2V6VXN0cVA0SXpxZmhtGAAgAA
you should repeat this request until response has a "scrollId" field if unmapped values less than 10,000 you can use 1st way. If more than 10,000 please use second one.
Comments
Please sign in to leave a comment.