Search documentation - 401ChemistryGenealogy/ChemistryGenealogy GitHub Wiki
The /search
path accepts a query string with a name
or id
parameter and will return all the immediate links related to that person. That is: the person's supervisor, mentor, who they supervised and who they mentored.
example
curl -X GET "localhost:3000/search?name=todd%20lowary"
{
"target":{
"id":1,
"name":"todd lowary",
"position":"professor",
"institution_id":1
},
"mentors":[
{
"id":4,
"name":"david bundle",
"position":"professor emeritus",
"institution_id":1
},
{
"id":5,
"name":"moreten meldel",
"position":null,
"institution_id":null
}
],
"mentored":[
],
"supervisors":[
{
"id":3,
"name":"ole hindsgaul",
"position":"professor emeritus",
"institution_id":1
}
],
"supervised":[
{
"id":2,
"name":"wei shi",
"position":"assistant professor",
"institution_id":3
}
],
"institutions":[
{
"id":1,
"name":"university of alberta"
},
{
"id":3,
"name":"university of arkansas"
}
]
}
notice: the %20
code in place of the space character.
using curl -X GET "localhost:3000/search?id=1"
will attain the same result.