Skip to content

Documentation Overview

SolveBio is a cloud-based operating system for molecular information that enables cross-disciplinary R&D groups to use complex multi-omics data from disparate sources to find biomarkers, stratify populations, and design clinical trials. SolveBio’s mapping technology transforms structured data into biomedical entities such as variants, genes, patients, samples, compounds, and phenotypes. Harmonized datasets are indexed and maintained on SolveBio and can be easily delivered to end-users via APIs and applications built upon them.

SolveBio provides many options for developers looking to enhance existing applications or build new ones quickly. Bioinformatics skills are not required but can be very helpful.


Getting Started

To get started, choose one of the available client libraries and work through the Dataset Quickstart. There are also a few example scripts available.

Authentication

Clients can authenticate with SolveBio API keys or OAuth2 access tokens. Without valid credentials, API endpoints may return 404 Not Found, 403 Forbidden, or 401 Not Authorized. OAuth2 access tokens are only used when logging in through a SolveBio App. In all other cases, you should use your API key.

Where is my API key?

You can find your API key in your Security Settings.

Using stored credentials

The Python client uses a stored credentials file located at ~/.solvebio/credentials. The R library looks for the $SOLVEBIO_API_KEY environment variable upon initialization. Your API key can be found in the Security Settings.

For Python, run the following command in your terminal to automatically generate the stored credentials file:

# For Single Sign-On (SSO) users, copy/paste your API key below:
$ solvebio login --api-key "Your API key"

# For non-SSO users (i.e. if you have a SolveBio email and password), run:
$ solvebio login

Once your credentials are stored you may use the login() function to load them in a script:

1
2
3
4
import solvebio

# Load your API key from the stored credentials file
solvebio.login()

For R, add the following to your ~/.Rprofile file in your home directory to set the environment variable:

Sys.setenv(SOLVEBIO_API_KEY="Your API key")

When writing R scripts, load your API key from the environment variable using the login() function:

1
2
3
4
library(solvebio)

# Load your API key from $SOLVEBIO_API_KEY
solvebio::login()

Testing your credentials

There are a few ways to test your credentials. If you are using the Python client, you can run solvebio whoami from the command line:

$ solvebio whoami
# You are logged-in to the "***" domain as ****@****.com with role member.

Within a block of python code:

# Login
solvebio.login()

# Get the current User
user = solvebio.User.retrieve()
print(user.email)

Within a block of R code:

# Load your credentials from $SOLVEBIO_API_KEY
solvebio::login()

# Get current User
User.retrieve()$email

You can also test a key with Curl by specifying the API key in the Authorization: Token header:

curl --header "Authorization: Token <API KEY>" https://api.solvebio.com
# {"detail": "Your API key is valid. Welcome to the SolveBio API!"}

You can test an OAuth2 access token using the Authorization: Bearer header:

curl --header "Authorization: Bearer <ACCESS TOKEN>" https://api.solvebio.com
# {"detail": "Your API key is valid. Welcome to the SolveBio API!"}

You may also specifying it in the access_token query parameter:

curl "https://api.solvebio.com?access_token=<ACCESS TOKEN>"
# {"detail": "Your API key is valid. Welcome to the SolveBio API!"}

Can't find what you're looking for? Contact SolveBio Support and we'll do our best to assist you.


Not a developer?

Building applications using SolveBio requires some development skills. You can always use SolveBio through its intuitive and friendly web interface: sign in here.


We're here to help!

We're always happy to help out with code or any questions you may have. Feel free to submit a ticket at any time or email support@solvebio.com to get in touch.