Partek Flow Documentation

Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Structure of the URI

http://example.com:8080/flow/api/v1

Authentication

The username and password must be supplied, unless the request is made in an authenticated session.

The password should be encrypted using the public key included in the PartekFlow-REST.zip as described in Usage of the Partek® Flow® REST API

Projects

/projects

 

POST, PUT

Creates a project.  Returns data for the specified project.

GET

Returns data for the specified project.

 

Required parameters

ParameterTypeDescription
projectstringThe name of the project.


Optional parameters

ParameterTypeDescription
ownerstringSets the project owner
namestringSets the project name
descriptionstringSets the project description
collaboratorstringIf this parameter is specified, then “role” must also be specified.  If the role parameter is “remove” then the specified collaborator is removed from the project, otherwise role must be a valid project role (Collaborator or Viewer).


Responses

200: application/json

The name, id, description, owner, and data of the project

400: Returned if the project parameter is missing.

403: Returned on a PUT request if a project with the specified name already exists.

Returned on a GET request if the user does not have permission to view the specified project.

404: Returned on a GET request if no project with the specified name exists


Example

http://example.com:8080/flow/api/v1/projects?project=My%20Project

{

 "name": "My Project",
 "id": "12",
 "description": "",
 "owner": "0",
 "data": [
   "Unaligned reads"
 ]
}

/projects/list

POST, PUT, GET


Responses

200: application/json

The name, id, description, owner, and data of each project the user has permission to view.

 

Example

http://example.com:8080/flow/api/v1/projects/list

[

 {
   "name": "My Project",
   "id": "12",
   "description": "",
   "owner": "0",
   "data": [
     "Unaligned reads"
   ]
 },

{
   "name": "DNA-Seq Project",
   "id": "13",
   "description": "",
   "owner": "0",
   "data": [
     "Variants"
   ]
 }

]

/projects/import

Required parameters

ParameterTypeDescription
filenamestringThe name of the file being uploaded.
filestringThe file content

Alternatively, a url can be specified.


Responses

200: application/json

The name, id, description, owner, and data of the project

500: If an error occurs importing the project

/projects/export

Required parameters

ParameterTypeDescription
projectIdsstringProject IDs separated by “,”

 

Optional parameters

ParameterTypeDescription
includeLibraryFilesbooleanIf true, library files will be included in the project zip.  Default:  false

 

Responses

200 application/zip

A zip file containing the project content.

/projects/delete

Required parameters

ParameterTypeDescription
projectIdsstring

Project IDs separated by “,”

 

Responses

200: application/json

The list of projects that were deleted

 

Samples

/samples

 

POST, PUT

Creates a sample.  Returns data for the specified sample.

GET

Returns data for the specified sample.

 

Required parameters

 

Parameter

Type

Description

sample

string

The name of the sample.

project

string

The name of the sample’s project.

 

Optional parameters

 

Parameter

Type

Description

vocabulary

string

If both vocabulary and term are specified, then the specified term is applied to the sample

term

string

 

 

Responses

 

200 application/json

The name, id, files, and attributes of the sample

400

Returned if the sample or project parameters are missing.

403

Returned if the user does not have permission to create samples in the project

404

Returned if there is no project with the given id or if a sample with the specified name can not be found

 

Example

 

http://example.com:8080/flow/api/v1/samples?project=My%20Project&sample=Sample1

 

{
 "name": "Sample1",
 "id": "0",
 "files": [

    "FastqFileDataType: 14138"

 ],
 "attributes": {
   "Type": [
     "Normal"
   ],
   "Pair": [
     "1"
   ]
 }
}

 

/samples/list

 

POST, GET

 

Required parameters

 

Parameter

Type

Description

project

string

The name of the project.

 

Responses

 

200 application/json

The name, id, files, and attributes of each sample in the project

 

Data

 

/data

 

PUT

Uploads a file for analysis.

Supported files:  unaligned reads, alignments, detected variants.

 

Required parameters

 

Parameter

Type

Description

filename

string

The name of the file being uploaded.

file

binary

The file content.

project

string

The id of the project to add the sample to.

 

filepath can be specified instead of filename/file if the data is already on the server.

 

Optional parameters

 

Parameter

Type

Description

sample

integer

The id of the sample to add file to.  Without this parameter a new sample will be created.

owner

string

The username of the user that should be the owner of the data.  The data will count against this user’s quota, if one is configured.  By default, the owner will be the user account that uploads the data.

upload_folder

string

If the file is uploaded through the servlet it will be put in this directory, if the owner has permission to access it.

 

Responses

 

200 application/json

id The ID of the data node for the file’s content type.

400

Returned if the specified file is not of a recognized type.

403

Returned if the user does not have permission to create samples in the project

404

Returned if there is no project with the given id

 

Library Files

/library_files

 

POST, PUT

Uploads and manages a library file

 

Required parameters

 

Parameter

Type

Description

file

binary

The file content.

file_type

string

The type of library file:  reference_genome

assembly

string

The assembly of the library file

 

Optional parameters

 

Parameter

Type

Description

species

string

The species of the library file.  This is looked up based on the assembly, and the assembly is used as the species if the assembly is not associated with any species.

 

Responses

 

200 application/json

The id of the imported library file

400

Returned if any required parameters are missing

 

GET

 

Required parameters

Parameter

Type

Description

file_type

string

The type of library file:  reference_genome

assembly

string

The assembly of the library file

 

Responses

 

200 application/json

The id of the specified resource

400

Returned if any required parameters are missing

404

Returned if no library file is managed for the specified library file and assembly

 

/library_files/list

Required parameters

 

Parameter

Type

Description

assembly

string

The assembly.

 

Optional parameters

Parameter

Type

Description

description

string

Filter the library file list to those that match this description.

 

Responses

 

200 application/json

The description and id for each library file managed for the specified assembly.

400

Returned if the assembly parameter is missing.

 

Example

 

http://example.com:8080/flow/api/v1/library_files/list?assembly=hg19

 

[
 {
   "description": "Reference sequence",
   "id": 1
 },

{
   "description": "Bowtie index",
   "id": 2
 }

]

Pipelines

/pipelines

 

POST, GET

Downloads a pipeline specification.

 

Required parameters

 

Parameter

Type

Description

pipeline

string

The name of the pipeline

 

Responses

 

200 application/json

The pipeline definition.

400

Returned if the pipeline parameter is missing

403

Returned if the user does not have permission to view the pipeline.

404

Returned if the specified pipeline can not be found.

 

/pipelines/list

 

POST, GET

 

Responses

 

200 application/json

The name, description, file, deletable status, creation date, and creator for each pipeline.

 

Example

 

http://example.com:8080/flow/api/v1/pipelines/list

 

[
 {
   "name": "My Pipeline",
   "description": "",
   "protocolFile": {
     "path": "\/home\/flow\/.partekflow\/partek_db\/protocol\/P20150629140508365_0.json"
   },
   "deletable": true,
   "creationDate": "1472850094644",
   "creator": {
     "arg$1": {
       "section": "Pipelines",
       "date": 1435604708365,
       "user": "",
       "userID": 0,
       "name": "My Pipeline",
       "description": ""
     }
   }
 }

]

 

/pipelines/input

 

POST, GET

 

Required parameters

 

Parameter

Type

Description

pipeline

string

The name of the pipeline

project

string

The project that the pipeline will run in

 

Optional parameters

 

 

Parameter

Type

Default

Description

data

string

Unaligned reads

The data node that the pipeline will run on, as returned by the /projects interface.  

 

Responses

 

200 application/json

A list of tasks and their required inputs.

403

Returned if the user does not have permission to view the pipeline.

404

Returned if the specified pipeline can not be found.

 

Example

 

http://example.com:8080/flow/api/v1/pipelines/inputs?project=My%20Project&pipeline=My%20Pipeline

 

{
 "BowtieTask": [
   "ebwt_reference"
 ],
 "SamtoolsTask": [
   "referenceFasta"
 ]
}

 

/pipelines/run

 

POST, GET

Runs the pipeline

 

Required parameters

 

 

Parameter

Type

Description

pipeline

string

The name of the pipeline to run.

project

string

The name of the project to run the pipeline in

inputs

integers

The ids of the resources, in the order returned by the /pipeline/inputs interface.  The ids of library files are returned by the /library_files interface.

 

Optional parameters

 

 

Parameter

Type

Default

Description

data

string

Unaligned reads

The data node to run the pipeline on, as returned by the /projects interface.  

 

Responses

 

200 application/json

pipeline_queued:  [the list of queued task IDs]

If there are missing inputs then the list of required inputs will be returned.

400

Returned if a required parameter is missing.

403

Returned if the user does not have permission to run tasks on the specified data node.

404

Returned if the specified project, data, or pipeline can not be found.

500

Returned if there is an error queueing the pipeline

 

Example

 

http://example.com:8080/flow/api/v1/pipelines/run?project=My%20Project&pipeline=My%Project&inputs=1,2

 

pipeline_queued: 1805,1806

 

Queue

 

/queue

 

POST, GET

Downloads summary information about the queue

 

Optional parameters

 

 

Parameter

Type

Description

project_filter

string

Only return tasks in this project

user_filter

string

Only return tasks run by this user

 

Responses

 

200 application/json

running:  the number of tasks currently running commands

waiting:  the total number of tasks queued, but not running

waitingForDiskSpace:  tasks that won’t run until hard disk space is made available.  

waitingForProject:  tasks that can’t run because of the project limit

waitingForResources:  tasks that require more resources (such as memory) to run

waitingForUpstreamTask:  tasks for which the input is currently unavailable

permanentlyStalled:  tasks that are waitingForDiskSpace or for which there is no worker with sufficient capacity to run

hasPendingCommands:  true if there are commands which can run if more resources are made available

 

403

Returned if the user does not have permission to view the queue.

404

Returned if the specified project can not be found.

 

Example

 

http://example.com:8080/flow/api/v1/queue

 

{
 "running": 1,
 "waiting": 4,
 "waitingForDiskSpace": 0,
 "waitingForProject": 0,
 "waitingForResources": 3,
 "waitingForUpstreamTask": 1,
 "permanentlyStalled": 0,

 "hasPendingCommands":"true"

}

 

/queue/tasks

 

Downloads information about the queued tasks

 

Optional parameters

 

 

Parameter

Type

Description

project_filter

string

Only return tasks in this project

user_filter

string

Only return tasks run by this user

 

Responses

 

200 application/json

id, task, runStatus, progress, submitted, started, end

403

Returned if the user does not have permission to view the queue.

404

Returned if the specified project can not be found.

 

Example

 

http://example.com:8080/flow/api/v1/queue/tasks

 

[
 {
   "id": 2590,
   "task": "Post-alignment QA\/QC",
   "runStatus": "Pending",
   "progress": 0,
   "submitted": "21 Oct 2016, 03:33 PM CDT",
   "started": "NA",
   "end": "NA"
 },
 {
   "id": 2589,
   "task": "TMAP - 5.0.0",
   "runStatus": "Running",
   "progress": 5,
   "submitted": "21 Oct 2016, 03:33 PM CDT",
   "started": "21 Oct 2016, 03:33 PM CDT",
   "end": "21 Oct 2016, 03:38 PM CDT"
 }
]

 

Users

 

/users

 

POST, PUT

Add and configure a specified user

 

Optional parameters

 

One of the following may be specified:

 

Parameter

Type

Description

user_name

string

The username of the user.  If the user does not exist it will be created.

user_id

integer

The ID of the user

 

If neither is specified, then the user specified by the username parameter (or the logged-in user) will be used

 

 

Parameter

Type

Description

distinguished_name

string

When creating a new user, this parameter specifies the LDAP distinguished name.

user_password

string

When creating a new user, this parameter specifies their initial Flow password.  If this parameter is absent and this is not an LDAP user then the user will receive an email with a link to set their initial password.

email

string

The user’s email address.  When creating a new user, this parameter is required.

display_name

string

The name that other users will see

enabled

boolean

Whether the user is able to log in.

admin

boolean

Whether the user has the admin role.  The system requires at least one admin account.

private_directory

string

If present, the directory will be created and the user will be given permission to use it.

quota

integer

The size of the user’s quota (in gigabytes) or “none” to remove any quota

notify_when_tasks_finish

boolean

Whether the user will receive an email when a task they have queued completes

notify_when_added_to_project

boolean

Whether the user will receive an email when they are added as a collaborator or viewer to a project

decimal_precison

integer

How many digits to show after the decimal point for numeric values in tables

 

 

Responses

 

200 application/json

id, name, displayName, isOnline, tasksInQueue, diskQuota, diskUsage (in gigabytes)

400

Returned if the user_name or user_id parameter is specified, but does not identify a valid user.

 

GET

Returns information about a specified user

 

Optional parameters

 

One of the following may be specified:

 

Parameter

Type

Description

user_name

string

The username of the user

user_id

integer

The ID of the user

 

if neither is specified, then the user specified by the username parameter (or the logged-in user) will be used

 

Responses

 

200 application/json

id, name, displayName, isOnline, tasksInQueue, diskQuota, diskUsage (in gigabytes)

400

Returned if the user_name or user_id parameter is specified, but does not identify a valid user.

 

Example

 

http://example.com:8080/flow/api/v1/users?user_id=0

 

[
 {
   "id": 0,
   "name": "admin",
   "displayName": "Administrator",
   "isOnline": true,
   "tasksInQueue": 1,
   "diskUsage": 83516042096
 }
]

 

/users/list

 

GET

Returns information about all users on the system

 

Additional Assistance

If you need additional assistance, please visit our support page to submit a help ticket or find phone numbers for regional support.

Your Rating: Results: 1 Star2 Star3 Star4 Star5 Star 1 rates

 

  • No labels