Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Users can generate a user-access token which is a temporary username and password to logon via RESTAPI or XNAT Upload Assistant

The Chapter 4 mentioned a way to use JSESSION ID to logon to XNAT. But if we are to use software such as XNAT Upload Assistant, we might still need to put in the username and password. Below outlines how we can get a temporary username and password from XNAT. 

1 use command line to get the XNAT temporary username and password

mbp:$ curl -u username "https://test.xnat.sydney.edu.au/data/services/tokens/issue"

...

{"ResultSet":{"Result":[{"pi_firstname":"","secondary_ID":"ForeFront","pi_lastname":"","name":"ForeFront Ageing and Neurodegeneration","description":"","ID":"FF","URI":"/data/projects/FF"}], "totalRecords": "1"}}


2 use Web Browser to get the XNAT temporary username and password

Logon to https://URL/data/services/tokens/issue

...

{"ResultSet":{"Result":[{"pi_firstname":"","secondary_ID":"ForeFront","pi_lastname":"","name":"ForeFront Ageing and Neurodegeneration","description":"","ID":"FF","URI":"/data/projects/FF"}], "totalRecords": "1"}}

Reference

https://wiki.xnat.org/docs16/4-developer-documentation/using-the-xnat-rest-api

...