Launch XNAT pipelina via REST

114 views Asked by At

I'm trying to write a script that would be able to launch the pipelines that are added to a specific project (i.e. the script would replace the user clicking on "build" for every subject on a specific project). In my head I am dividing the problem into three tasks:

  1. Getting the lists of subjects in PROJECT.
  2. Getting the list of pipelines already added in PROJECT.
  3. Launch the selected pipeline (which has to be present in the list generated in 2) for every subject (list collected in 1).

Now, as I see it, I'm already facing some problems:
How could I get a list of subjects for a PROJECT? Maybe using pyXNAT is easier...
How can I retrieve the list of pipelines added in a project?
How can I launch ONE pipeline on ONE subject (the same as clicking build on MR report page) via the REST-API? Is it possible?

I'm using XNAT 1.6.3
with Tomcat 6.0.41
and PostgreSQL 9.1
on Ubuntu 14.04

I hope my question is clear and thanks for your time!!

1

There are 1 answers

0
Sven On

I have no answers regarding the pipelines, although I figure they can be triggered via REST protocol. For the basic stuff, have a look at the pyxnat documentation https://pythonhosted.org/pyxnat/index.html#short-examples