returning habitat metadata with a POST request

20 views
Skip to first unread message

Serina Robinson

unread,
Oct 4, 2023, 8:57:09 PM10/4/23
to gmgc-users
Hello, I am using the API to 'search' by submitting a POST request of only a sequences in a test.fasta file. It is working well for me. However,  some important metadata like "habitat" and "taxon (predicted)" are not returned in the POST request as they are when using the web server. Is there a way to already include these columns in the POST request so that all associated metadata can be included in the POST search? Apologies if this is trivial!

Luis Pedro Coelho

unread,
Oct 5, 2023, 3:02:17 AM10/5/23
to Serina Robinson, gmgc-users
Dear Serina,

If I understood your issue correctly, I think the answer is that you need two calls:

The first to get the identifiers, the second to get the metadata

If I slightly adapt the example from the docs (https://gmgc.embl.de/api_help.cgi), I get it:

curl --header 'Content-Type: application/json' --request POST --data '{"names": ["GMGC10.003_873_867.PHOA", "GMGC10.016_471_114.PHOA"]}' 'https://gmgc.embl.de/api/v1.0/unigenes'

(Note the plural, the URL should be https://gmgc.embl.de/api/v1.0/unigenes  with the S at the end to allow you to query multiple unigenes in a single call)

HTH, Luis

Luis Pedro Coelho | Queensland University of Technology | https://luispedro.org


On Wed, 4 Oct 2023, at 9:08 PM, Serina Robinson wrote:
Hello, I am using the API to 'search' by submitting a POST request of only a sequences in a test.fasta file. It is working well for me. However,  some important metadata like "habitat" and "taxon (predicted)" are not returned in the POST request as they are when using the web server. Is there a way to already include these columns in the POST request so that all associated metadata can be included in the POST search? Apologies if this is trivial!


--
You received this message because you are subscribed to the Google Groups "gmgc-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gmgc-users+...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages