curl --request GET \
--url https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates \
--header 'Authorization: Bearer <token>'import requests
url = "https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates', 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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates",
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>"
],
]);
$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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates"
req, _ := http.NewRequest("GET", url, nil)
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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"blocking_failures": [
{
"blocking": true,
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"evaluated_at_sha": "<string>",
"finding_count": 123,
"gate_definition_id": "<string>",
"gate_key": "<string>",
"gate_type": "<string>",
"head_sha": "<string>",
"id": "<string>",
"outcome": "<string>",
"rationale": "<string>",
"reviewers": [
{
"login": "<string>",
"reason": "<string>",
"reviewed_head_sha": "<string>",
"state": "pending",
"actor_account_id": "<string>"
}
],
"runner_ids": [
"<string>"
],
"stale_reason": "<string>",
"status": "<string>",
"value": "<unknown>",
"not_applicable_reason": "no_changes",
"state": "<string>"
}
],
"evaluated_at": "2023-11-07T05:31:56Z",
"gates": [
{
"blocking": true,
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"evaluated_at_sha": "<string>",
"finding_count": 123,
"gate_definition_id": "<string>",
"gate_key": "<string>",
"gate_type": "<string>",
"head_sha": "<string>",
"id": "<string>",
"outcome": "<string>",
"rationale": "<string>",
"reviewers": [
{
"login": "<string>",
"reason": "<string>",
"reviewed_head_sha": "<string>",
"state": "pending",
"actor_account_id": "<string>"
}
],
"runner_ids": [
"<string>"
],
"stale_reason": "<string>",
"status": "<string>",
"value": "<unknown>",
"not_applicable_reason": "no_changes",
"state": "<string>"
}
],
"gates_enabled": true,
"head_sha": "<string>",
"mergeable": true,
"$schema": "/api/v1/schemas/TrailGatesResponse.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}Get the configurable gate evaluation for a change (repo_id addressing)
Accepted credentials: User token, Plugin installation token.
Evaluates configured gates using persisted checks results. mergeable indicates whether these gates allow merging; it does not include merge conflicts or guarantee fresh CI evidence. Use /mergeability for current merge readiness.
Use an own-account bearer token (including supported service accounts) or a Core-issued plugin installation bearer token, subject to the permissions and restrictions below. Plugin assertion JWTs and plugin OAuth user-delegation tokens are not accepted here.
Requires live repository pull permission (contents:read for plugin installations). Other authorized automation principals can also use this operation. Trails must be enabled. Send requests to the repository’s primary API region.
curl --request GET \
--url https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates \
--header 'Authorization: Bearer <token>'import requests
url = "https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates', 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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates",
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>"
],
]);
$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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates"
req, _ := http.NewRequest("GET", url, nil)
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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/gates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"blocking_failures": [
{
"blocking": true,
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"evaluated_at_sha": "<string>",
"finding_count": 123,
"gate_definition_id": "<string>",
"gate_key": "<string>",
"gate_type": "<string>",
"head_sha": "<string>",
"id": "<string>",
"outcome": "<string>",
"rationale": "<string>",
"reviewers": [
{
"login": "<string>",
"reason": "<string>",
"reviewed_head_sha": "<string>",
"state": "pending",
"actor_account_id": "<string>"
}
],
"runner_ids": [
"<string>"
],
"stale_reason": "<string>",
"status": "<string>",
"value": "<unknown>",
"not_applicable_reason": "no_changes",
"state": "<string>"
}
],
"evaluated_at": "2023-11-07T05:31:56Z",
"gates": [
{
"blocking": true,
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"evaluated_at_sha": "<string>",
"finding_count": 123,
"gate_definition_id": "<string>",
"gate_key": "<string>",
"gate_type": "<string>",
"head_sha": "<string>",
"id": "<string>",
"outcome": "<string>",
"rationale": "<string>",
"reviewers": [
{
"login": "<string>",
"reason": "<string>",
"reviewed_head_sha": "<string>",
"state": "pending",
"actor_account_id": "<string>"
}
],
"runner_ids": [
"<string>"
],
"stale_reason": "<string>",
"status": "<string>",
"value": "<unknown>",
"not_applicable_reason": "no_changes",
"state": "<string>"
}
],
"gates_enabled": true,
"head_sha": "<string>",
"mergeable": true,
"$schema": "/api/v1/schemas/TrailGatesResponse.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}Path Parameters
Response
OK
Was this page helpful?