Partek Flow Documentation

Page tree

Versions Compared

Key

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

Table of Contents
maxLevel2
minLevel2
excludeAdditional Assistance

 

With the Partek Flow REST API you can create custom solutions to query or drive your server.

The API reference documentation is available here:  REST API for Partek Flow

The public key and Python libraries are available here:  PartekFlow-REST.zip

 

Generate an authentication token

 

An access token can be generated from the System information section of the settings page.

 

Image Added

 

 

 

Alternatively, GetToken.py will generate a token.

 

>python GetToken.py --server localhost:8080 --user admin

 

Example output:

 

TOKEN: cUOWY0VvkSFagrDUANVtM7A8SPal8Gx0cf0ee24bfa9fe68e2b5564dab2b6a27e1fb525e5...

 


This token can be specified as the --password parameter for the Python API.

 

If the token is not supplied, then the Python API will prompt for the password and encrypt it.

 

When accessing the API directly, the encrypt parameter must be specified with the RSA value to use the token.

 

For example:

 

 

curl --form username=admin --form encrypt=RSA --form password=cUOWY0VvkSFagr... http://localhost:8080/flow/api/v1/users/list

 

Upload and analyze a group of samples.

...

Use UploadSamples.py to upload the samples and launch the pipeline

>python python UploadSamples.py -v --server http://localhost:8080 --user admin --password [access token] --files ~/sample1.fastq.gz ~/sample2.fastq.gz --project ProjectName --pipeline AlignAndQuantify --inputs 28061,145855

Generate an authentication token

 

An access token can be generated from the System information section of the settings page.

Image Removed

 

Alternatively, GetToken.py will generate a token.

>python GetToken.py --server localhost:8080 --user admin

 

Example output:

TOKEN: cUOWY0VvkSFagrDUANVtM7A8SPal8Gx0cf0ee24bfa9fe68e2b5564dab2b6a27e1fb525e5...

 

This token can be specified as the --password parameter for the Python API.

If the token is not supplied, then the Python API will prompt for the password and encrypt it.

When accessing the API directly, the encrypt parameter must be specified with the RSA value to use the token.

For example:

 

curl --form username=admin --form encrypt=RSA --form password=cUOWY0VvkSFagr... http://localhost:8080/flow/api/v1/users/list

Add a collaborator to a project

curl -X PUT "http://localhost:8080/flow/api/v1/projects?project=ProjectName&collaborator=user1&role=Collaborator&username=admin&encrypt=RSA&password=[url encoded token]"

...

              python UploadSamples.py -v --server $SERVER --user $USER --password $TOKEN --files $path/$file --project "$PROJECT" --pipeline $PIPELINE --inputs $INPUTS 

      fi

  done

Monitor the queue and send a notification if there are too many waiting tasks

...