...
Get all the descendants of an entity. The results are paginated. Use the optional query parameter limit to set the maximum page size. The default page size is 20. To fetch the next page, find the last entity (descendant) on the current page and use its ID to set the query parameter lastEntityId. Here is an example:
...
Code Block |
---|
language | bash |
---|
title | Response for getting the first page |
---|
collapse | true |
---|
|
{
"idList": [
{
"id": "syn111"
},
{
"id": "syn112"
}
]
}
|
Code Block |
---|
language | bash |
---|
title | Request for getting the second page |
---|
|
curl -i -H sessionToken:<yourToken> -H Accept:application/json 'https://repo.prod.sagebase.org/repo/v1/entity/syn1125146<entityID>/descendants?limit=20&lastEntityId=syn112' |
Code Block |
---|
language | bash |
---|
title | Response for getting the second page | collapse | true |
---|
|
{
"idList": [
{
"id": "syn113"
},
{
"id": "syn115syn114"
},
{
"id": "syn116syn115"
}
]
}
|
Get the descendants of a specific generation
Get all the descendants that are exactly n generations away. The children is generation 1. Children's children are generation 2. So on and so forth. The results are paginated in the same manner. To fetch the next page, find the last entity (descendant) on the current page and use its ID to set the query parameter lastEntityId. Here is an example:
Code Block |
---|
language | bash |
---|
title | Request for getting the first page |
---|
| # To be writtendescendants of the 2nd generation |
|
curl -i -H sessionToken:<yourToken> -H Accept:application/json 'https://repo.prod.sagebase.org/repo/v1/entity/<entityID>/descendants/2 |
Code Block |
---|
Code Block |
---|
language | bash |
---|
title | Response for getting the second page |
---|
collapse | true |
---|
|
# To be writtenlanguage | bash |
---|
title | Response for getting the first page |
---|
collapse | true |
---|
|
# To be written |
Code Block |
---|
language | bash |
---|
title | Request for getting the second page |
---|
|
# To be written |
the descendants of the 2nd generation |
|
{
"idList": [
{
"id": "syn114"
},
{
"id": "syn115"
}
]
} |
References
Find reference to any version of an entity
...