Closed ariutta closed 7 years ago
Making a change like this is only worthwhile if there's a general consensus that doing so would make the webservice easier to understand. @egonw made a comment on slack about preferring search
over identifierSearch
. @egonw, are you not in favor of option A)? How about options B) and C)?
Also, it would be great to hear feedback from @AlexanderPico, @AlasdairGray, @JonathanMELIUS and anyone else interested.
Closing for lack of interest.
For the webservice, I often get the different search types confused:
search
as in GET/Human/search/1234
freeSearch
as in GET/Human/isFreeSearchSupported
attributeSearch
as in GET/Human/attributeSearch/CCR5
Would anyone else find it helpful if we updated the endpoints to make it easier to distinguish between the search types? Here are three sets of alternatives that I find easier to understand:
A
/Human/identifierSearch/1234
/Human/isIdentifierSearchSupported
=>true
/Human/attributeSearch/CCR5
Note that since BridgeDb is primarily about identifiers, one could argue that
search
is better thanidentifierSearch
.B
Webservice could accept a new query parameter named
field
with a default value ofIdentifier
:/Human/search/1234
(equiv. to/Human/search/1234?field=Identifier
)/Human/isSearchSupported
=>true
(equiv. to/Human/isSearchSupported?field=Identifier
)/Human/search/CCR5?field=Symbol
/Human/isSearchSupported?field=Symbol
(optional new endpoint)C
/Human/identifier/1234
/Human/searchFields/identifier
=>true
/Human/symbol/CCR5
/Human/searchFields/symbol
=>true
(optional new endpoint)Not sure about desired capitalization:
search_fields
vs.searchFields
oridentifier
vs.Identifier
,symbol
vs.Symbol
. Some people recommend not using capital letters in webservice endpoints.If we changed anything, we'd obviously need to add redirects for backwards compatibility.