Read an automation's run log
curl --request GET \
--url https://api.outerlayer.ai/v1/apps/{appId}/automation-runs \
--header 'Authorization: Bearer <token>' \
--header 'X-Outerlayer-App-Id: <api-key>'import requests
url = "https://api.outerlayer.ai/v1/apps/{appId}/automation-runs"
headers = {
"X-Outerlayer-App-Id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Outerlayer-App-Id': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.outerlayer.ai/v1/apps/{appId}/automation-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://api.outerlayer.ai/v1/apps/{appId}/automation-runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Outerlayer-App-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.outerlayer.ai/v1/apps/{appId}/automation-runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Outerlayer-App-Id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.outerlayer.ai/v1/apps/{appId}/automation-runs")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/apps/{appId}/automation-runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Outerlayer-App-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"actor": {
"kind": "member",
"name": "<string>"
},
"createdAt": "<string>",
"detail": {
"attempt": 2,
"baseBranch": "<string>",
"commit": "<string>",
"limit": 123,
"memberName": "<string>",
"notSent": [
{
"count": 2,
"reason": "aside"
}
],
"problems": 1,
"refusal": "pull_request_from_fork",
"sent": 1,
"step": "<string>",
"total": 1
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issue": {
"key": "<string>",
"title": "<string>",
"tracker": "<string>",
"url": "<string>"
},
"reason": "<string>",
"result": "built",
"alertKey": "<string>",
"issues": [
{
"key": "<string>",
"outcome": "reported",
"title": "<string>",
"topic": "<string>",
"tracker": "<string>",
"trackerAnswer": "<string>",
"url": "<string>",
"workItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"nothingReason": "<string>",
"pullRequest": {
"headSha": "<string>",
"number": 123,
"repository": "<string>",
"title": "<string>"
},
"repository": "<string>",
"runnerReason": "<string>",
"session": {
"id": "<string>",
"traceId": "<string>"
},
"startedBy": {
"kind": "schedule",
"name": "<string>"
},
"timeLimitSeconds": 123,
"trackerAnswer": "<string>",
"waiting": {
"reason": "no-runner",
"hosts": [
{
"host": "<string>",
"state": "draining",
"version": "<string>"
}
]
},
"workItem": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": 123
}
}
]
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Apps
Read an automation's run log
Lists the runs of one automation, newest first: a custom automation by its id, or a built-in automation by its kind, such as label-build. Each run has its issue, its result (built, waiting, skipped, failed, filed, refused, sent or reviewed), a reason and the person who opened the issue or added the label. A run of a built-in automation that acts on pull requests (merge-conflict, failed-check, review-comment or code-review) also has its pullRequest, its workItem and, for a code review that could not run, its runnerReason. before reads runs older than a time, to page back; send the last run’s createdAt and id as before and beforeId. Runs are kept for 90 days.
GET
/
v1
/
apps
/
{appId}
/
automation-runs
Read an automation's run log
curl --request GET \
--url https://api.outerlayer.ai/v1/apps/{appId}/automation-runs \
--header 'Authorization: Bearer <token>' \
--header 'X-Outerlayer-App-Id: <api-key>'import requests
url = "https://api.outerlayer.ai/v1/apps/{appId}/automation-runs"
headers = {
"X-Outerlayer-App-Id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Outerlayer-App-Id': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.outerlayer.ai/v1/apps/{appId}/automation-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://api.outerlayer.ai/v1/apps/{appId}/automation-runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Outerlayer-App-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.outerlayer.ai/v1/apps/{appId}/automation-runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Outerlayer-App-Id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.outerlayer.ai/v1/apps/{appId}/automation-runs")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/apps/{appId}/automation-runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Outerlayer-App-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"actor": {
"kind": "member",
"name": "<string>"
},
"createdAt": "<string>",
"detail": {
"attempt": 2,
"baseBranch": "<string>",
"commit": "<string>",
"limit": 123,
"memberName": "<string>",
"notSent": [
{
"count": 2,
"reason": "aside"
}
],
"problems": 1,
"refusal": "pull_request_from_fork",
"sent": 1,
"step": "<string>",
"total": 1
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issue": {
"key": "<string>",
"title": "<string>",
"tracker": "<string>",
"url": "<string>"
},
"reason": "<string>",
"result": "built",
"alertKey": "<string>",
"issues": [
{
"key": "<string>",
"outcome": "reported",
"title": "<string>",
"topic": "<string>",
"tracker": "<string>",
"trackerAnswer": "<string>",
"url": "<string>",
"workItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"nothingReason": "<string>",
"pullRequest": {
"headSha": "<string>",
"number": 123,
"repository": "<string>",
"title": "<string>"
},
"repository": "<string>",
"runnerReason": "<string>",
"session": {
"id": "<string>",
"traceId": "<string>"
},
"startedBy": {
"kind": "schedule",
"name": "<string>"
},
"timeLimitSeconds": 123,
"trackerAnswer": "<string>",
"waiting": {
"reason": "no-runner",
"hosts": [
{
"host": "<string>",
"state": "draining",
"version": "<string>"
}
]
},
"workItem": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": 123
}
}
]
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}