Trigger a dynamic pull request run
curl --request POST \
--url https://tester.army/api/v1/projects/{projectId}/pull-request-runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"targetUrl": "<string>",
"pullRequest": {
"number": 1,
"title": "<string>",
"commitSha": "<string>",
"provider": "github",
"description": "<string>",
"baseBranch": "<string>",
"headBranch": "<string>"
},
"platform": "web"
}
'import requests
url = "https://tester.army/api/v1/projects/{projectId}/pull-request-runs"
payload = {
"targetUrl": "<string>",
"pullRequest": {
"number": 1,
"title": "<string>",
"commitSha": "<string>",
"provider": "github",
"description": "<string>",
"baseBranch": "<string>",
"headBranch": "<string>"
},
"platform": "web"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetUrl: '<string>',
pullRequest: {
number: 1,
title: '<string>',
commitSha: '<string>',
provider: 'github',
description: '<string>',
baseBranch: '<string>',
headBranch: '<string>'
},
platform: 'web'
})
};
fetch('https://tester.army/api/v1/projects/{projectId}/pull-request-runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tester.army/api/v1/projects/{projectId}/pull-request-runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'targetUrl' => '<string>',
'pullRequest' => [
'number' => 1,
'title' => '<string>',
'commitSha' => '<string>',
'provider' => 'github',
'description' => '<string>',
'baseBranch' => '<string>',
'headBranch' => '<string>'
],
'platform' => 'web'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tester.army/api/v1/projects/{projectId}/pull-request-runs"
payload := strings.NewReader("{\n \"targetUrl\": \"<string>\",\n \"pullRequest\": {\n \"number\": 1,\n \"title\": \"<string>\",\n \"commitSha\": \"<string>\",\n \"provider\": \"github\",\n \"description\": \"<string>\",\n \"baseBranch\": \"<string>\",\n \"headBranch\": \"<string>\"\n },\n \"platform\": \"web\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tester.army/api/v1/projects/{projectId}/pull-request-runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"targetUrl\": \"<string>\",\n \"pullRequest\": {\n \"number\": 1,\n \"title\": \"<string>\",\n \"commitSha\": \"<string>\",\n \"provider\": \"github\",\n \"description\": \"<string>\",\n \"baseBranch\": \"<string>\",\n \"headBranch\": \"<string>\"\n },\n \"platform\": \"web\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tester.army/api/v1/projects/{projectId}/pull-request-runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetUrl\": \"<string>\",\n \"pullRequest\": {\n \"number\": 1,\n \"title\": \"<string>\",\n \"commitSha\": \"<string>\",\n \"provider\": \"github\",\n \"description\": \"<string>\",\n \"baseBranch\": \"<string>\",\n \"headBranch\": \"<string>\"\n },\n \"platform\": \"web\"\n}"
response = http.request(request)
puts response.read_body{
"status": "queued",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "web",
"skipReason": "<string>",
"metadata": {
"github": {
"configured": true,
"checkRunCreated": true,
"commentTargetResolved": true,
"status": "not_configured"
},
"mobile": {
"source": "<string>",
"buildId": "<string>"
}
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Trigger the dynamic PR agent from CI using PR metadata. Callers do not send changed files; TesterArmy enriches with changed files and GitHub reporting only when the project has a supported GitHub connection.
POST
/
v1
/
projects
/
{projectId}
/
pull-request-runs
Trigger a dynamic pull request run
curl --request POST \
--url https://tester.army/api/v1/projects/{projectId}/pull-request-runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"targetUrl": "<string>",
"pullRequest": {
"number": 1,
"title": "<string>",
"commitSha": "<string>",
"provider": "github",
"description": "<string>",
"baseBranch": "<string>",
"headBranch": "<string>"
},
"platform": "web"
}
'import requests
url = "https://tester.army/api/v1/projects/{projectId}/pull-request-runs"
payload = {
"targetUrl": "<string>",
"pullRequest": {
"number": 1,
"title": "<string>",
"commitSha": "<string>",
"provider": "github",
"description": "<string>",
"baseBranch": "<string>",
"headBranch": "<string>"
},
"platform": "web"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetUrl: '<string>',
pullRequest: {
number: 1,
title: '<string>',
commitSha: '<string>',
provider: 'github',
description: '<string>',
baseBranch: '<string>',
headBranch: '<string>'
},
platform: 'web'
})
};
fetch('https://tester.army/api/v1/projects/{projectId}/pull-request-runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tester.army/api/v1/projects/{projectId}/pull-request-runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'targetUrl' => '<string>',
'pullRequest' => [
'number' => 1,
'title' => '<string>',
'commitSha' => '<string>',
'provider' => 'github',
'description' => '<string>',
'baseBranch' => '<string>',
'headBranch' => '<string>'
],
'platform' => 'web'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tester.army/api/v1/projects/{projectId}/pull-request-runs"
payload := strings.NewReader("{\n \"targetUrl\": \"<string>\",\n \"pullRequest\": {\n \"number\": 1,\n \"title\": \"<string>\",\n \"commitSha\": \"<string>\",\n \"provider\": \"github\",\n \"description\": \"<string>\",\n \"baseBranch\": \"<string>\",\n \"headBranch\": \"<string>\"\n },\n \"platform\": \"web\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tester.army/api/v1/projects/{projectId}/pull-request-runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"targetUrl\": \"<string>\",\n \"pullRequest\": {\n \"number\": 1,\n \"title\": \"<string>\",\n \"commitSha\": \"<string>\",\n \"provider\": \"github\",\n \"description\": \"<string>\",\n \"baseBranch\": \"<string>\",\n \"headBranch\": \"<string>\"\n },\n \"platform\": \"web\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tester.army/api/v1/projects/{projectId}/pull-request-runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetUrl\": \"<string>\",\n \"pullRequest\": {\n \"number\": 1,\n \"title\": \"<string>\",\n \"commitSha\": \"<string>\",\n \"provider\": \"github\",\n \"description\": \"<string>\",\n \"baseBranch\": \"<string>\",\n \"headBranch\": \"<string>\"\n },\n \"platform\": \"web\"\n}"
response = http.request(request)
puts response.read_body{
"status": "queued",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "web",
"skipReason": "<string>",
"metadata": {
"github": {
"configured": true,
"checkRunCreated": true,
"commentTargetResolved": true,
"status": "not_configured"
},
"mobile": {
"source": "<string>",
"buildId": "<string>"
}
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key authentication using Bearer token format
Path Parameters
Project ID or shortId
Body
application/json
Response
Dynamic PR run queued successfully
"skipped" means the PR skip judge decided the changes cannot affect this platform; a cancelled audit run records the decision and no test executes.
Available options:
queued, skipped Available options:
web, ios, android Present only when status is "skipped".
Show child attributes
Show child attributes