Content Server Rest API 20.4 - Search
Hello,
I am trying to use the Content Server Rest API to search in content server.
I have found two alternatives for searching:
### search in a special location : full text search POST https://servername/OTCS2/cs.exe/api/v2/search HTTP/1.1 OTDSTicket: {{ticket}} Cache-Control: no-cache where1=*&location_id1=1896817 ### search in special location: full text with LQL POST https://servername/OTCS2/cs.exe/api/v2/search HTTP/1.1 OTDSTicket: {{ticket}} Cache-Control: no-cache where=*%20and%20OTLocation%3A1896817
Now I would like to additonally search for documents that have the category "Studies", as shown in the search form below.
How are these search parameters for the Category translated for the API?
How would the POST request look like?
Thanks.
Comments
-
what does the HTTP Request look like with that field included ? you can then take the same field name and value pairing to REST usually.
0 -
Thanks for your hints, I first could not figure out the syntax for searching for document which have a certain category. Now it works:
### search for full text "graz" and for a category
### studies category has id 2147812
POST https://Servername/OTCS/cs.exe/api/v2/search HTTP/1.1
OTDSTicket: {{ticket}}
Cache-Control: no-cache
where=graz* and OTDCategory:2147812
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 151 General Questions
- 147 Thrust Services
- 56 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 184 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 7 XM Fax
- Follow Categories