You can call StartWorkflow to create a workflow.

Request information

Request line

POST /gs/workflow  HTTP/1.1

Custom request headers

None. For more information, see Common parameters.i

Request body

The following example creates a mapping workflow.
{
      "workflow_type": "mapping",
      "service": "s" (#SLA: [n: normal|s: silver|g: gold|p: platinum])
      "mapping_oss_region": "cn-shenzhen",
      "mapping_fastq_first_filename": "MGISEQ2000_PCR-free_NA12878_1_V100003043_L01_1.fq.gz",
      "mapping_fastq_second_filename": "MGISEQ2000_PCR-free_NA12878_1_V100003043_L01_2.fq.gz",
      "mapping_bucket_name": "gene-shenzhen",
      "mapping_fastq_path": "fastq/MGISEQ2000",
      "mapping_reference_path": "reference/hg19", [Optional]
      "mapping_is_mark_dup": "true",
      "mapping_bam_out_path": "output/bamDirName",
      "mapping_bam_out_filename": "abc.bam"
}


The following example creates a WGS workflow.
{
     "workflow_type": "wgs",
     "service": "s" (#SLA: [n: normal|s: silver|g: gold|p: platinum]),
     "wgs_oss_region": "cn-shenzhen",
     "wgs_fastq_first_filename": "MGISEQ2000_PCR-free_NA12878_1_V100003043_L01_1.fq.gz",
     "wgs_fastq_second_filename": "MGISEQ2000_PCR-free_NA12878_1_V100003043_L01_2.fq.gz",
     "wgs_bucket_name": "gene-shenzhen",
     "wgs_fastq_path": "fastq/MGISEQ2000",
     "wgs_reference_path": "reference/hg19",
     "wgs_vcf_out_path": "output/vcf",
     "wgs_vcf_out_filename": "abc.vcf"
}
Table 1. Request body description
Parameter Type Description
workflow_type String The type of the workflow. Valid values: wgs and mapping.
service String The type of SLA. Valid values: n, s, g, and p.
mapping_oss_region String The region where the OSS data of the mapping workflow is stored.
mapping_fastq_first_filename String The name of the first FASTQ file of the mapping workflow.
mapping_fastq_second_filename String The name of the second FASTQ file of the mapping workflow.
mapping_bucket_name String The name of the bucket where the data of the mapping workflow is stored.
mapping_fastq_path String The path of the FASTQ file of the mapping workflow.
mapping_reference_path String The path of the reference file of the mapping workflow.
mapping_is_mark_dup String Whether to mark duplicate values.
mapping_bam_out_path String The output path of the BAM file.
mapping_bam_out_filename String The output name of the BAM file.
wgs_oss_region String The region where the OSS data of the WGS workflow is stored.
wgs_fastq_first_filename String The name of the first FASTQ file of the WGS workflow.
wgs_fastq_second_filename String The name of the second FASTQ file of the WGS workflow.
wgs_bucket_name String The name of the bucket where the data of the WGS workflow is stored.
wgs_fastq_path String The path of the FASTQ file of the WGS workflow.
wgs_reference_path String The path of the reference file of the WGS workflow.
wgs_vcf_out_path String The output path of the VCF file.
wgs_vcf_out_filename String The output name of the VCF file.

Response information

Response line

HTTP/1.1 200 OK

Custom response headers

None. For more information, see Common parameters.

Response body

The following output appears when a mapping workflow is created. 
{
        JobName: mapping-gpu-66xv7
    }

The following output appears when a WGS workflow is created.
    {
        JobName: wgs-gpu-tvltf
    }
Table 2. Response body description
Parameter Type Description
JobName String The name of the workflow.

Examples

Sample requests (Python)

#! /usr/bin/env python
# coding=utf-8

from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.request import CommonRequest
import os

os.environ.setdefault('DEBUG', 'sdk')

client = AcsClient(os.environ['accessKeyID'], os.environ['accessKeySecret'], 'cn-beijing')

request = CommonRequest()
request.set_accept_format('json')
request.set_method('POST')
request.set_protocol_type('https') # https | http
request.set_domain('cs.cn-beijing.aliyuncs.com')
request.set_version('2015-12-15')

request.add_query_param('RegionId', "cn-shenzhen")
request.add_header('Content-Type', 'application/json')
request.set_uri_pattern('/gs/workflow')
body = '''{"cli_version":"v1.0.1-882299b","wgs_bucket_name":"my-test-shenzhen","wgs_fastq_first_name":"MGISEQ/MGISEQ2000_PCR-free_NA12878_1_V100003043_L01_1.fq.gz","wgs_fastq_second_name":"MGISEQ/MGISEQ2000_PCR-free_NA12878_1_V100003043_L01_2.fq.gz","wgs_oss_region":"cn-shenzhen","wgs_reference_file":"hs37d5","wgs_service":"g","wgs_vcf_File_name":"vcf/MGISEQ_NA12878_hs37d5_13.vcf","workflow_type":"WGS"}'''
request.set_content(body.encode('utf-8'))
response = client.do_action_with_exception(request)