Links | Synapse Documentation

Links

Synapse Links provide users the ability to create a link to any File, Table, Folder, or Project on Synapse.

Web

Navigate to the file, table, folder or project you want to save a link of. Click Tools and Save Link to.

Select a folder or project that you want to save the link to (This feature is more like bookmarking the file to a specific location).

The final result looks like:

Python
import synapseclient
syn = synapseclient.login()

# Add a local file to an existing project (syn12345) on Synapse
# targetId is the synapse id of the file, table, etc that you want to link
# targetVersion is optional, if no version is defined, the link will always point to the newest version
# parent is the folder or project where you want to link to exist
linkEnt = synapseclient.Link(targetId="syn12345", targetVersion=1, parent="syn2345")
linkEnt = syn.store(linkEnt)
R
library(synapser)
synLogin()

# Add a local file to an existing project (syn12345) on Synapse
# targetId is the synapse id of the file, table, etc that you want to link
# targetVersion is optional, if no version is defined, the link will always point to the newest version
# parent is the folder or project where you want to link to exist
linkEnt <- Link(targetId="syn12345", targetVersion=1, parent="syn2345")
linkEnt <- synStore(linkEnt)

See Also

Annotations and Queries, Downloading Data, Files and Versioning

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).