I encountered an undesired behaviour while working with the new v3.2 API.
In 3.1, when no results where found for a query (my example: applicant name = 'xckjsdlfkjsdlfkj', something that is very likely not existing), the response was 200 OK , and an empty JSON object.
That is expected behaviour, at least from my point of view.
http://ops.epo.org/3.1/rest-services/pu ... lfkjsdlfkj
Response:
Code: Select all
HTTP/1.1 200 OK
ETag:
"xxx"
X-EPO-Client-IP:
xxx
Content-Length:
355
Access-Control-Allow-Methods:
POST
Connection:
keep-alive
X-IndividualQuotaPerHour-Used:
7483
Server:
Apache
Cache-Control:
must-revalidate, max-age=86400
X-EPO-Forwarded:
[xxx]
X-Throttling-Control:
overloaded (images=green:50, inpadoc=green:30, other=green:1000, retrieval=green:50, search=green:5)
Access-Control-Allow-Headers:
Authorization
Date:
Mon, 27 Feb 2017 23:06:20 GMT
Access-Control-Allow-Origin:
*
Vary:
Accept
X-API:
ops-v3.1
X-AnonymousQuotaPerMinute-Used:
1
X-AnonymousQuotaPerDay-Used:
2684816
Content-Type:
application/json
{
"ops:world-patent-data": {
"@xmlns": {
"ops": "http://ops.epo.org",
"$": "http://www.epo.org/exchange",
"xlink": "http://www.w3.org/1999/xlink"
},
"ops:meta": {
"@name": "elapsed-time",
"@value": "5"
},
"ops:biblio-search": {
"@total-result-count": "0",
"ops:query": {
"$": "pa = xckjsdlfkjsdlfkj",
"@syntax": "CQL"
},
"ops:range": {
"@begin": "1",
"@end": "25"
},
"ops:search-result": {}
}
}
}
When doing the same GET request (but it is the same for the new POST method, I already tested it), I received Status 404 Entity Not Found.
This is highly irritating, because it signals to me that I tried to access and endpoint or resource which is not existing, but not a resource which is empty.
http://ops.epo.org/3.2/rest-services/pu ... lfkjsdlfkj
Response:
Code: Select all
HTTP/1.1 404 Not Found
Content-Language:
en
X-EPO-Client-IP:
xxx
Content-Length:
179
Access-Control-Allow-Methods:
POST
Connection:
keep-alive
X-IndividualQuotaPerHour-Used:
16038
Server:
Apache
X-EPO-Forwarded:
[xxx]
X-Throttling-Control:
idle (images=green:200, inpadoc=green:60, other=green:1000, retrieval=green:200, search=green:30)
X-Throttling-Control:
idle (images=green:200, inpadoc=green:60, other=green:1000, retrieval=green:200, search=green:30)
Access-Control-Allow-Headers:
Authorization
Date:
Mon, 27 Feb 2017 23:11:49 GMT
Access-Control-Allow-Origin:
*
X-API:
ops-v3.2
Content-Type:
application/xml
X-RegisteredQuotaPerWeek-Used:
134434724
<?xml version="1.0" encoding="UTF-8"?>
<fault xmlns="http://ops.epo.org">
<code>SERVER.EntityNotFound</code>
<message>No results found</message>
</fault>
Could you possibly try to make empty responses Status 200 again, and also include the overhead as you did before?
(Additionally, the 404 response is in application/xml, althought application/json was requested.)
Thanks a lot,
Best,
Nisse