You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.
I am using the link below to get the descendants of diabetes. At the end of
the link it shows that this page had total 78 id's and 4 pages and the
current page is only showing 20 elements (data for 20 id's)
The above script gave all the pages in one json file. But the issue is that
I have to check every time *totalElement *(as the database will keep
updating) before running the script, which is not ideal for the automation
process.
Is there any way the script can automatically detect the totalElements and
use that in the size of the step* des = {'page':0, 'size': 78}?*
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Copied from RT
I am using the link below to get the descendants of diabetes. At the end of
the link it shows that this page had total 78 id's and 4 pages and the
current page is only showing 20 elements (data for 20 id's)
},
"page" : {
"size" : 20,
"totalElements" : 78,
"totalPages" : 4,
"number" : 0
}
}
https://www.ebi.ac.uk/ols/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000400/descendants
.
I used the following python script for getting all the pages and elements
at one go
import requests
des = {'page':0, 'size': 78}
data = requests.get('https://www.ebi.ac.uk/ols/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000400/descendants',
params=des)
data.json()
The above script gave all the pages in one json file. But the issue is that
I have to check every time *totalElement *(as the database will keep
updating) before running the script, which is not ideal for the automation
process.
Is there any way the script can automatically detect the totalElements and
use that in the size of the step* des = {'page':0, 'size': 78}?*
The text was updated successfully, but these errors were encountered: