I am trying to programmatically map a list of UniProtKB id’s (e.g. P04035) to their Ensembl id’s (e.g. ENSG00000113161.17 in this case). It is very easy, but time-consuming, via the webpage UniProt and would prefer not manually uploading a file with a bunch of IDs.
They do provide some tips as to how to submit a POST request via curl at UniProt.
But, after several days of failed attempts, I don’t know how to proceed. I don’t know much about POST requests, or API access for that matter.
I even have the API request for this example, as translated by the web mapping tool:
curl --form 'from=UniProtKB_AC-ID' --form 'to=Ensembl' --form 'ids=P04035' https://rest.uniprot.org/idmapping/run
But I do not know how to properly “transfer” the curl command to the POST request node, except for the URL address (I put https://rest.uniprot.org/idmapping/run). But then I have no idea what to put as request body.
Ultimately, I would like to achieve the following:
list of uniprot IDs > list of EnsembleID > query OpenTargets (I suppose a nice example workflow for this one would be: Query GraphQL API – KNIME Hub)
Can you please help me out how to set up the POST request with the POST node?
Thank you very much, I hope I gave enough details.