批量实例化流水线模板

Request method/request path

POST /ms/openapi/api/apigw/v3/projects/{projectId}/templates/{templateId}/templateInstances

Resource description

Batch instantiate pipelined templates

Input parameter description

Query parameter

Parameter nameParameter typemustParameter descriptionDefault value

version

integer

is

Template version

useTemplateSettings

boolean

no

Whether to apply template Settings

Body parameter

Parameter nameParameter typemustParameter descriptionDefault value

body

is

Create an instance

Path parameter

Parameter nameParameter typemustParameter descriptionDefault value

projectId

string

is

Item ID

templateId

string

is

Template ID

response

HTTP codedescriptionParameter type

200

successful operation

Request sample

curl -X POST '[please replace API address bar request address]? version={version}&useTemplateSettings={useTemplateSettings}' 

HEADER example

accept: application/json Content-Type: application/json 

Return example -200

{  "data" : {  "failurePipelines" : "string",  "failureMessages" : {  "string" : "string"  },  "successPipelinesId" : "string",  "successPipelines" : "string"  },  "message" : "String",  "status" : 0 } 

TemplateInstanceCreate

Parameter nameParameter typemustParameter description

pipelineName

string

no

pipelineName

param

no

param

buildNo

no

buildNo

Build Model - Form element attributes

Parameter nameParameter typemustParameter description

defaultValue

object

is

Default value

containerType

no

Builder type drop-down

glob

string

no

Custom warehouse wildcards

replaceKey

string

no

Replace the search keyword in the search url

readOnly

boolean

no

Whether to read only

label

string

no

Element tag

type

ENUM(STRING, TEXTAREA, ENUM, DATE, LONG, BOOLEAN, SVN_TAG, GIT_REF, MULTIPLE, CODE_LIB, CONTAINER_TYPE, ARTIFACTORY, SUB_PIPELINE, CUSTOM_FILE, PASSWORD, TEMPORARY, )

is

Element type

required

boolean

is

Whether it is necessary

repoHashId

string

no

repoHashId

scmType

ENUM(CODE_SVN, CODE_GIT, CODE_GITLAB, GITHUB, CODE_TGIT, )

no

Code base type drop-down

relativePath

string

no

relativePath

propertyType

string

no

Element module

options

no

Drop-down list

searchUrl

string

no

Search for the url. When it is a drop-down option, the list value is obtained from the url and not from Option

id

string

is

Element ID- Identifier

placeholder

string

no

Element placeholder

properties

object

no

File metadata

desc

string

no

description

BuildContainerType

Parameter nameParameter typemustParameter description

os

ENUM(MACOS, WINDOWS, LINUX, )

no

os

buildType

ENUM(ESXi, MACOS, DOCKER, IDC, PUBLIC_DEVCLOUD, TSTACK, THIRD_PARTY_AGENT_ID, THIRD_PARTY_AGENT_ENV, THIRD_PARTY_PCG, THIRD_PARTY_DEVCLOUD, GIT_CI, AGENT_LESS, )

no

buildType

Build Model - Drop down box form element values

Parameter nameParameter typemustParameter description

value

string

is

Element value Name - for display

key

string

is

Element value ID- identifier

BuildNo

Parameter nameParameter typemustParameter description

buildNoType

ENUM(CONSISTENT, SUCCESS_BUILD_INCREMENT, EVERY_BUILD_INCREMENT, )

no

buildNoType

buildNo

integer

no

buildNo

required

boolean

no

required

TemplateOperationRet

Parameter nameParameter typemustParameter description

data

no

data

message

string

no

message

status

integer

no

status

TemplateOperationMessage

Parameter nameParameter typemustParameter description

failurePipelines

List

no

failurePipelines

failureMessages

object

no

failureMessages

successPipelinesId

List

no

successPipelinesId

successPipelines

List

no

successPipelines

Last updated