why would you not want to get the results in chunks based on pagesize/offset? you can tune the pageSize parameter to based on your system. You can also try using async calls to reduce any wait time
if you are creating a ui - then it is probably best to use /2/catalog/data/search (assuming v10.2.2hf1+), which can also supports facets.
Can you share link of documentation which gives more info about the facets
I didn't found much over the internet for it
I suggest you experiment using the swagger-ui for combinations of settings with any api endpoint, including the facets concept.
facets are what you see in the ldmcatalog ui - after searching, it counts the instances of whatever is setup to be a facetable field.
from the api (search endpoint) you can specify which facets you want to use - e.g. core.classType (will count instances returned by class type). you can combine these - e.g. - find all objects - and facet on resourceType and classType. when doing this - it does not matter how many objects you return (in a page), the facet count will still be returned.
if you specify facet=true defaultFacets=true - you will get all of the default facets used by the system (same as ldmcatalog ui). if you want only specific facets, you use the facetid parameter (multi-valued) & set defaultFacets=false
example: search for all objects - with facet on classType and resourceType - returning 1 actual object - and 2 facets.
the first facet returned - shows that there are 28784 relational column objects
scrolling down a little further to the 2nd facet - we see total objects per resource type
Thank you Darren, but we are using 10.2.1 and we don't have facet feature in api.
Our requirement is when user searches for an product let's say customer we are calling below api.
This api might give us 100+ objects having word customer, api will only return first 20 objects (we are passing page size of 20) on first page.
Now we are showing filters in our screen, they are populated based on api response since we are just getting 20 records filters don't show all the values.
filters on page first of api response will have different values than second page
Is there a way I can just get selected fields for an object like resource name, resource type, asset type, some customer attribute and I get it for all of the product matching user input in single api call without using the page size param.
Keeping page size max number is an option but it takes a huge performance hit
i suggest using 1/catalog/data/search - it uses facets and will work much faster than objects
Thanks Darren, this api is super fast as compared to objects the only issue here is it does not provide labels
Is there a way I can get labels as the api response same as we got in objects api.
newer versions of search (both /1 and /2 return the label.
for now - you should use 2/catalog/models/attributes (gets all attributes) and store a map/dict of the attribute id to label - for any custom attributes