Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API search endpoint has bad default argument for levels on swagger page #145

Open
caaespin opened this issue Oct 29, 2018 · 3 comments
Open
Assignees
Labels
api changes to the api controller level bug frontend changes to website and visible features

Comments

@caaespin
Copy link

Hi,

I don't know where else to reach out to, but hopefully this is the right place. Today I started getting 404s on queries that used to work with no issues. For example,

http://oncotree.mskcc.org/api/tumorTypes/search/code/GCB?version=oncotree_latest_stable&exactMatch=true&levels=1%2C2%2C3%2C4%2C5

does not work as of this moment. Is the database down or something?

I see GCB on the Tree diagram on the website, so I'm puzzled why it's not working all of a sudden.

@caaespin
Copy link
Author

@sheridancbio have you been able to take a look at this by any chance?

@sheridancbio
Copy link
Contributor

Yes .. I think I figured this out.

The query does work correctly, but our default value for the "levels" argument is incorrect.

You queried for
http://oncotree.mskcc.org/api/tumorTypes/search/code/GCB?version=oncotree_latest_stable&exactMatch=true&levels=1%2C2%2C3%2C4%2C5
--- notice that the "levels" parameter which comes last specifies that it is looking on levels "1,2,3,4,5"

however, the GCB node is on level 6 down from the root node. The current tree goes to depth 7, so we should change the default argument for levels to "1,2,3,4,5,6,7" ... or make it so that when the levels argument is not supplied, all levels are searched.

For now, the you would be able to get correct answers from the api by giving a more complete levels range in the query, so
http://oncotree.mskcc.org/api/tumorTypes/search/code/GCB?version=oncotree_latest_stable&exactMatch=true&levels=1%2C2%2C3%2C4%2C5%2C6%2C7
will return this result:
[{"code":"GCB","color":"LimeGreen","name":"Germinal Center B-Cell Type","mainType":"Mature B-Cell Neoplasms","externalReferences":{},"tissue":"Lymphoid","children":{},"parent":"DLBCLNOS","history":[],"level":6}]

We have added a card to our scrum planning board and will correct this behavior in the near future.

@sheridancbio sheridancbio added bug api changes to the api controller level frontend changes to website and visible features labels Nov 1, 2018
@sheridancbio
Copy link
Contributor

Thank you for reporting this issue @caaespin cc: @ritikakundra

@sheridancbio sheridancbio changed the title Getting 404 on queries API search endpoint has bad default argument for levels on swagger page Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api changes to the api controller level bug frontend changes to website and visible features
Projects
None yet
Development

No branches or pull requests

2 participants