---
# System prepended metadata

title: Jenkins API for internal network

---

#  Jenkins API for internal network

## trigger pipeline
```=shell
## api test
curl -X POST http://10.0.64.138:8089/job/prod-autoqa-backend-deploy
/build \
  -u autoqa:1171da9e5bb667adcdd9b3810fa7ed0558
  
 curl -X POST http://10.0.64.138:8089/job/API_automated_regression/lastBuild/buildNumber \
  -u autoqa:1171da9e5bb667adcdd9b3810fa7ed0558
```

## trigger pipeline with params
```=shell
## api test feature
curl -X POST http://10.0.64.138:8089/job/API_automated_regression/buildWithParameters \
  -u autoqa:1171da9e5bb667adcdd9b3810fa7ed0558 \
  --data-urlencode "FEATURE='_740_投注_單投.feature|_723_快速設置.feature'" \
  --data-urlencode "STAGE=m6s" \
  --data-urlencode "MODE=feature"


## api test scenario
curl -I -X POST http://10.0.64.138:8089/job/API_automated_regression/buildWithParameters \
  -u autoqa:1171da9e5bb667adcdd9b3810fa7ed0558 \
  --data-urlencode "SCENARIO='站内信显示未读消息数量，点击跳转站内信页面|盘口设置切换欧洲盘/香港盘，M6展示对应盘口赔率'" \
  --data-urlencode "STAGE=m6s" \
  --data-urlencode "MODE=scenario"

```



## query runs describe
```=shell
## api test
curl -X GET http://10.0.64.138:8089/job/API_automated_regression/wfapi/runs \
-u autoqa:1171da9e5bb667adcdd9b3810fa7ed0558

curl -X GET http://10.0.64.138:8089/job/API_automated_regression/59/wfapi/ \
-u autoqa:1171da9e5bb667adcdd9b3810fa7ed0558
```

## stop running build with id 

```=shell
## api test
curl -X  POST http://10.0.64.138:8089/job/API_automated_regression/39/stop 
  -u autoqa:1171da9e5bb667adcdd9b3810fa7ed0558
``` 

## configuration 
```=shell
## get config xml
curl -X GET http://10.0.64.138:8089/job/API_automated_regression/config.xml \
 -u autoqa:1171da9e5bb667adcdd9b3810fa7ed0558 \
 -o config.xml
 
## update config xml
curl -X POST http://10.0.64.138:8089/job/API_automated_regression/config.xml \
 -u autoqa:1171da9e5bb667adcdd9b3810fa7ed0558 \
 --data-binary @./config-test1.xml \
 -H 'Content-Type: application/xml'

curl -X POST https://10./0.64.138:8089/job/API_automated_regression/configSubmit \
 -u autoqa:1171da9e5bb667adcdd9b3810fa7ed0558 \
 --data 'org-jenkinsci-plugins-parameterizedscheduler-ParameterizedTimerTrigger: off'


http://qa-jk.zyq6.top
``` 

```
<triggers>
        <org.jenkinsci.plugins.parameterizedscheduler.ParameterizedTimerTrigger plugin="parameterized-scheduler@255.v73827fcdf618">
          <spec></spec>
          <parameterizedSpecification>*/5 * * * * %MODE=scenario;SCENARIO=&apos;站内信显示未读消息数量，点击跳转站内信页面&apos;;STAGE=m6s;SCHEDULE_BUILD=true
*/6 * * * * %MODE=scenario;SCENARIO=&apos;站内信显示未读消息数量，点击跳转站内信页面&apos;;STAGE=m6s;SCHEDULE_BUILD=true
*/7 * * * * %MODE=scenario;SCENARIO=&apos;站内信显示未读消息数量，点击跳转站内信页面&apos;;STAGE=m6s;SCHEDULE_BUILD=true
*/8 * * * * %MODE=scenario;SCENARIO=&apos;站内信显示未读消息数量，点击跳转站内信页面&apos;;STAGE=m6s;SCHEDULE_BUILD=true</parameterizedSpecification>
        </org.jenkinsci.plugins.parameterizedscheduler.ParameterizedTimerTrigger>
      </triggers>

```