-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Hi OXO team,
How to use the Search Mappings endpoint?
I can't seem to understand how to use these other parameters.
This is the only example provided in the documentation:
curl 'https://www.ebi.ac.uk/spot/oxo/api/search' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"ids" : [ "DOID:162" ],
"inputSource" : null,
"mappingTarget" : [ "MONDO" ],
"mappingSource" : [ "MONDO" ],
"distance" : 1
}'
How to use the inputSource parameter? Can mappingTarget or mappingSource be null? I am getting bad requests when I do such combinations. It would be helpful if you could provide at least one example per combination. Also, the bad request messages are not useful:
curl 'https://www.ebi.ac.uk/spot/oxo/api/search' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"ids" : null,
"inputSource" : [ "EFO" ],
"mappingTarget" : [ "MONDO" ],
"mappingSource" : [ "MONDO" ],
"distance" : 1
}'
HTTP/1.1 400 Bad Request
Server: Apache-Coyote/1.1
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Type: application/json;charset=UTF-8
Strict-Transport-Security: max-age=0
Date: Mon, 16 Oct 2023 21:21:27 GMT
X-Application-Context: application
Expires: 0
X-XSS-Protection: 1; mode=block
Pragma: no-cache
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
Connection: close
X-Frame-Options: DENY
{"timestamp":1697491287674,"status":400,"error":"Bad Request","exception":"org.springframework.http.converter.HttpMessageNotReadableException","message":"Could not read document: Can not deserialize instance of java.lang.String out of START_ARRAY token\n at [Source: java.io.PushbackInputStream@4a8e2b98; line: 3, column: 19] (through reference chain: uk.ac.ebi.spot.model.MappingSearchRequest[\"inputSource\"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_ARRAY token\n at [Source: java.io.PushbackInputStream@4a8e2b98; line: 3, column: 19] (through reference chain: uk.ac.ebi.spot.model.MappingSearchRequest[\"inputSource\"])","path":"/spot/oxo/api/search"}
Metadata
Metadata
Assignees
Labels
No labels