API
RDP provides an extensive RESTful API to perform gene searches, obtain user details, etc.
Authentication
All API endpoints can be authorized with a secret token that can be generated by creating
a service account or listed under rdp.settings.isearch.auth-tokens
.
GET /api HTTP/1.1
Authorization: Bearer {accessToken}
Passing the authorization token via auth
query parameter is deprecated as of 1.4.0.
Keep in mind that the token you use is tied to a user that has permissions. What you can see through the API will be restricted to what the corresponding user is authorized to read.
List all users
List all users in a paginated format.
GET /api/users HTTP/1.1
page
the page to query starting from zero tototalPages
If rdp.settings.privacy.enable-anonymized-search-results
is set to true
, anonymized results are included in the
output.
List all genes
List all genes in a paginated format.
GET /api/genes HTTP/1.1
page
the page to query starting from zero tototalPages
If rdp.settings.privacy.enable-anonymized-search-results
is set to true
, anonymized results are included in the
output.
Search users
Search users by name or description.
GET /api/users/search HTTP/1.1
By name:
nameLike
a name in the user profileprefix
a booleantrue
orfalse
whether the name search is matching a prefix
By description:
descriptionLike
a description in the user profile
In any case, you can narrow down the result with the following query parameters:
researcherPositions
a set of researcher positions, onlyPRINCIPAL_INVESTIGATOR
is currently supportedresearcherCategories
a set of researcher category likeIN_SILICO
orIN_VITRO
organUberonIds
a set of Uberon identifiers that the user has added to its profile as organ systems
Search genes
Search user genes by symbols.
GET /api/genes/search HTTP/1.1
symbol
a gene symboltaxonId
a taxon identifier in which the search is performedorthologTaxonId
an ortholog taxon identifier, omitting it searches all taxatiers
a set of tiers includingTIER1
,TIER2
andTIER3
Then any of the following as described in "Search users":
researcherPositions
researcherCategories
organUberonIds
The tier
query parameter is deprecated as of 1.4.0.
Find a user by its identifier
Find a user given its real or anonymous identifier.
GET /api/users/{userId} HTTP/1.1
Or anonymously:
GET /api/users/by-anonymous-id/{anonymousId} HTTP/1.1
The anonymous identifier can be obtained by performing a users or genes search and retrieving the anonymousId
from its
result.
Statistics
Obtain a few statistics for the number of registered users, genes, etc.
GET /api/stats HTTP/1.1