Hello, Periodically, we upload datasets that we generate DOIs for. We use the Python synapseclient to automate it. The DOI creation + retrieval steps are the only one that we have yet to automate. 1. Is there a way to create DOI for a given Synapse entity via API? 2. Is there a way to retrieve DOI for a given Synapse entity via API? I tried `.get_annotations`, but that doesn't seem to include DOI; should it? Thanks, Simon

Created by Simon Podhajsky spodhajsky
Hi Simon: There isn't a direct call in the Python client but you can use the REST API to get and create DOIs. The rest docs: https://rest-docs.synapse.org/rest/#org.sagebionetworks.repo.web.controller.DoiController has the services. The way you use them from the Python client is the restGET and restPOST functions. For example: ``` import synapseclient syn = synapseclient.login() syn.restGET('/doi' ...) ```

Programmatic retrieval/creation of DOI for folder? page is loading…