Simple Search VIA REST API - api/v2/search
Hi,
I need to make a simple search to get documents by some parameters. I scouted this forum for some info and got a few queries that can fit :
.../otcs/cs.exe/api/v2/search?where={OTSubType:144}&limit=3®ions={OTDataID:74818}
So I assume that this query searches documents (type 144) at the folder (OTDataID:74818) and suppose to show up to 3 results (limit=3)
Unfortunately I get too much data in response that I can't understand. Seems that I get some huge search results with irrelevant ones.
How can I make it be more filtered or something?
Comments
-
can you post a snippet of the data that you get and indicate what you want / dont want etc ?
https://developer.opentext.com/apis/14ba85a7-4693-48d3-8c93-9214c663edd2/undefined/b4af0f46-ca39-4fac-8e1a-cb77661fa8b0#operation/GetRegionsInfo2, or a similar version for your version of OTCS shows the structure of the response from the request.
0 -
Hi Greg,
So if you can see this :
The JSON that I get has collections, links and results. I don't need the collections nor the links.
Any way I can filter and get only the results?
This is the query that I send as GET request :
api/v2/search?where={OTSubType:144 AND Attr_25105_14:1}®ions={OTDataID:25105}
Attr_25105_14:1 - Attribute in a category which has 1 as value.
OTDataID:25105 - Category to perform the search on.
OTSubType:144 - Find only document types.
0 -
I suspect not without a change to the end point as its an API call so it will return what the API spec defines. If you dont need those objects then you can discount them.
An alternative may be to use another interface to get your results, e.g. XML, HTTP etc ?
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 153 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories