Hi,
We have been using the OPS API integrated with our web application. The Bibliographic Data search stopped working for the last couple of days with an error HTTP 400 Bad Request.
https://ops.epo.org/3.2/rest-services/p ... o?q=pa=[US] and pd within "20231030,20231105" and ic any "A01,A21,A22,A23,A24,A41,A42,A43,A44,A45" and pn=WO&range=1-100
The same URL works fine when we try via the OPS portal
Can someone please help me sort out the issue?
Thanks,
Merin
Bibliographic Data search not working from our application
-
- Posts: 9
- Joined: Tue Nov 07, 2017 3:59 pm
-
- Posts: 32
- Joined: Tue Jul 16, 2013 1:45 pm
- Contact:
Re: Bibliographic Data search not working from our application
Hi Merin,
without being sure, that the query will be adapted before send out, the query will not work.
Normally this is done by using some module.
Your request will be then something like
So my advice is to check/debug the URL just before you start the request.
If you can use your program with curl, you probably may try something like (in my system)
Here you see, that "[US]" needs special attention.
Hope it helps,
Martien
without being sure, that the query will be adapted before send out, the query will not work.
Normally this is done by using some module.
Your request will be then something like
Code: Select all
https://ops.epo.org/3.2/rest-services/published-data/search/biblio?q=pa=[US]%20AND%20pd%20within%20%2220231030,20231105%22%20AND%20ic%20any%20%22A01,A21,A22,A23,A24,A41,A42,A43,A44,A45%22%20AND%20pn=WO&range=1-100'
In CQL e.g.:
"((pa = [US] AND pd within \"20231030,20231105\") AND ic any A01,A21,A22,A23,A24,A41,A42,A43,A44,A45) AND pn = WO AND range=1-100"
If you can use your program with curl, you probably may try something like (in my system)
Code: Select all
curl -X POST --data "pretty=1" http://127.0.0.1:80xx/api/3.2/published-data/search/biblio?'q=pa=\[US\]%20AND%20pd%20within%20"20231030,20231105"%20AND%20ic%20any%20"A01,A21,A22,A23,A24,A41,A42,A43,A44,A45"%20AND%20pn=WO'
Hope it helps,
Martien
-
- Posts: 9
- Joined: Tue Nov 07, 2017 3:59 pm
Re: Bibliographic Data search not working from our application
Hi Martien,
Thanks for your reply.
Yes, I eventually realized that the URL must be encoded before sending. Its now working.
Regards,
Merin
Thanks for your reply.
Yes, I eventually realized that the URL must be encoded before sending. Its now working.
Regards,
Merin