Getting Started with the Synapse API Clients | Synapse Documentation

Getting Started with the Synapse API Clients

The API clients provide a way to use Synapse programmatically. This page shows you how to install and login to get you started. Packages to interface and access data within Synapse are available for:

  • Command Line
  • Python
  • R

To manage stored login credentials, visit the Client Configuration page.

Command Line

The Synapse command line client is implemented in Python and comes with the Synapse Python package. To install the Synapse command line client, please make sure that you have Python and pip installed. Instruction on Python installation Instruction on pip installation

After installing pip and python, in your terminal (Mac OS or GNU/Linux) or Command Prompt (Windows), run the following command:

pip install synapseclient
synapseclient login "username" "password"
synapseclient -h

For more documentation on the command line client, see the synapseclient docs.

Python

The synapseclient package is available to use Python to access Synapse. See the Python client docs for supported versions of Python.

pip install synapseclient

For complete documentation of the Python client, visit the synapseclient docs.

R

The synapser package is available for R version 3.4 and 3.5.

install.packages("synapser", repos=c("http://ran.synapse.org", "http://cran.fhcrc.org"))
install.packages("synapser")
library(synapser)
synLogin("username", "password")

For more documentation on the R client, see synapser R docs.

To Report an Issue

Report client-specific issues or bugs at the R client or Python (including the command line client) GitHub Issues pages. If you have questions on how to use the clients to interact with Synapse, please ask in the Synapse Help Forum.

Need More Help?

Try posting a question to our Forum.

Let us know what was unclear or what has not been covered. Reader feedback is key to making the documentation better, so please let us know or open an issue in our Github repository (Sage-Bionetworks/synapseDocs).