Experiment Sharing API does not work

44 views
Skip to first unread message

Schnei Gamu

unread,
May 28, 2024, 9:47:29 AMMay 28
to xnat_discussion
Hi all,

We tried to share experiment data from one to another project using API calls following this example:
https://groups.google.com/g/xnat_discussion/c/UPd4bPWQoXY/m/ex226x8QAAAJ

We first share the subject and then the experiment with the following commands:
PUT - /data/projects/{original-project-id}/subjects/{subject-id | subject-label}/projects/{shared-project-id}
PUT - /data/projects/{original-project-id}/subjects/{subject-id | subject-label}/experiments/{experiment-id | experiment-label}/projects/{shared-project-id}

The first PUT command returns 200 and works, project shows as shared. 
The second PUT command to share the experiment also returns 200 but the experiment stays not shared. 

We tried this with different projects and experiments, but could not get it to work.

We are using: 
XNAT 1.8.10 build 117
Server version: Apache Tomcat/9.0.53

Thanks for looking into this,
Nils

Charlie Moore

unread,
Jun 3, 2024, 1:45:26 PMJun 3
to xnat_discussion
Hi Nils,

Do you have any other details you can add on this? I tried to recreate it, but it worked as expected for me.

Thanks,
Charlie Moore

Schnei Gamu

unread,
Jun 4, 2024, 12:32:11 PMJun 4
to xnat_discussion
Hi Charlie,

Thanks for looking into this. I attached two screenshots of how this looks like for us after sharing subject and experiment into a new project. First is the view as an admin, experiment is listed as shared into the new project, but the second screenshot shows the user view of the same experiment in the new project, marked as "You do not have access to this data". 
When we share the same subject/experiment with the GUI it works as expected, experiment is showing as shared and user can access the experiment in the new project. 

Can it be that we also have to share scans after sharing subject and experiments, to get the experiment accessible to the user? We would be interested in sharing specific scans at one point anyways, to be able to share just one scan out of many, do you have some advice how that might be done with the API?

Thanks,
Nils

1_AdminView
1_AdminView_experiment_shared_API.jpg
2_UserView
2_UserView_experiment_shared_API.jpg

Charlie Moore

unread,
Jun 4, 2024, 12:56:01 PMJun 4
to xnat_discussion
I'm not really sure what would cause this. If you save the XML from the session (look in the Actions box on the session box) after sharing it in the UI, and again when you share it with REST instead, are there any differences?

Thanks,
Charlie Moore

Reply all
Reply to author
Forward
0 new messages