Hi,
I am wondering how I can get a run id an app
session.
Basically I want to get some basic run meta information (i.e. run_name) from the project where my app was triggered.
Based on the api doc, it looks like 'appsession' is the starting point.
I could manage to get a project name and id from my app session, but don't know how to get a run id.
Is it possible to get the run id from a project id at the API level?
The only workaround I could think of is to retrieve a list of runs accessible by the current user as explained from the following doc: https://developer.basespace.illumina.com/docs/content/documentation/rest-api/api-reference#GET%3a_users%2fcurrent%2fruns
Then, maybe I could get the run id having the same ExperimentName with the current Project name.
However this plan did not go well as my php script returns nothing as shown below:
$ch = curl_init(BASESPACE_API_URL.'/'.USER_RUN_REF); curl_setopt($ch, CURLOPT_HTTPHEADER, array('x-access-token: '.ACCESS_TOKEN)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0); curl_exec($ch);
Strangely, If I copy the URL (BASESPACE_API_URL.'/'.USER_RUN_REF) and paste it into a browser, I could see it.
What went wrong?
Any thoughts?
Thanks,
Sung
Hi Sung,A Project may contain Samples from multiple Runs. To find how a Project relates to a Run, you will need to look at the Sample metadata within that Project (https://developer.basespace.illumina.com/docs/content/documentation/rest-api/api-reference#Samples.) This request will return the ExperimentName of the Run that created it, and you can then match on those names. In some cases, the user may not have access to the original Run, this is because Projects and Runs are separate resources and are permissioned separately. In that case, the user may not have a Run with that ExperimentName because they were only shared the Project in BaseSpace.Projects are a container for Samples (.fastq) and AppResults (.bam, .vcf, and other result files.) You can find more information about this in the BaseSpace Data Model Overview.Please do not hesitate to post more information should you need further assistance. Hope this helps!
Sincerely,The BaseSpace Platform Team
On Friday, June 14, 2013 6:09:23 AM UTC-7, Sungsam Gong wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "basespace-developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/basespace-developers/ZbRDpwRNXL0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to basespace-develo...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Dear Mayank,Thanks for your reply.No problem accessing Samples info from my script using the API, but still no luck retrieving a list of runs for the current user (e..g users/{ID}/runs).As I said previously, it shows:{"Response":{"Items":[],"DisplayedCount":0,"TotalCount":0,"Offset":0,"Limit":10,"SortDir":"Asc","SortBy":"Id"},"ResponseStatus":{},"Notifications":[]}
However, using exactly same URL, my web browser displays what I expected to see from the php script.Why it returns nothing from the script?Again, the script works well with Samples (e.g. v1pre3/projects/1/samples).Kind regards,Sung
To unsubscribe from this group and all its topics, send an email to basespace-developers+unsub...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to basespace-develo...@googlegroups.com.
Dear Team,
To unsubscribe from this group and all its topics, send an email to basespace-developers+unsubscrib...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.