XSYNC REST API json request format for project credentials

65 views
Skip to first unread message

Rohit Kakodkar

unread,
Dec 20, 2021, 9:48:51 AM12/20/21
to xnat_discussion
Hi everyone,

We are trying to use XSYNC REST API to configure projects to sync to the relay. We have been able to set up configurations using REST API. But currently having trouble to configure the credentials for the remote. From looking at the XSYNC source code, we were able to infer the following JSON format for credentails POST /xsync/credentials/save/projects/{project_id}

JSON body:
{
    "username": "",
    "secret": "",
    "host": "",
    "alias": "",
    "localProject": "",
    "remoteProjectId": ""
}

What are the inputs for the fields "secret", and "alias"? Should we be getting tokens from the XNAT remote server? If so how?

Thank you for any help!

Rohit  

Mohana Ramaratnam

unread,
Dec 20, 2021, 12:56:06 PM12/20/21
to xnat_discussion
Hi Rohit,

Have you used the Manage Tab on the Project for which you are configuring Xsync? Using Manage Tab -> Xsync Configuration -> Remote Credentials, you would be able to set the remote credentials. You dont have to use the REST API

Mohana

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/8a7a4805-c682-4f33-8f2e-1fdf491e64adn%40googlegroups.com.

Rohit Kakodkar

unread,
Dec 22, 2021, 9:22:27 AM12/22/21
to xnat_discussion
Hi Mohana,

Thank you for your getting back. Yes we are currently using the Manage tab within the project to set our configurations. However, we wanted to automate the administrative tasks programatically, hence, looking into REST API. 

Again, thanks for your help.

Best,
Rohit 

Rohit Kakodkar

unread,
Jan 4, 2022, 8:56:21 AM1/4/22
to xnat_discussion
Bumping this up again. Appreciate any inputs.

Rohit

samb...@gmail.com

unread,
Oct 20, 2022, 6:41:44 PM10/20/22
to xnat_discussion

Calling a GET on /data/services/tokens/issue/ will return the information you need
Reply all
Reply to author
Forward
0 new messages