Submit an approval decision on a trail (repo_id addressing)
curl --request POST \
--url https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/approvals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>"
}
'import requests
url = "https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/approvals"
payload = { "body": "<string>" }
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({body: JSON.stringify('<string>')})
};
fetch('https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/approvals', 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}/trails/{number}/approvals",
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([
'body' => '<string>'
]),
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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/approvals"
payload := strings.NewReader("{\n \"body\": \"<string>\"\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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/approvals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/approvals")
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 \"body\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"approval": {
"author": "<string>",
"body": "<string>",
"commit_sha": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"event": "<string>",
"id": "<string>"
},
"gates": {
"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"
},
"ok": true,
"$schema": "/api/v1/schemas/TrailApprovalSubmitResponse.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"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}Approvals
Submit an approval decision on a trail (repo_id addressing)
POST
/
repos
/
{repo_id}
/
trails
/
{number}
/
approvals
Submit an approval decision on a trail (repo_id addressing)
curl --request POST \
--url https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/approvals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>"
}
'import requests
url = "https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/approvals"
payload = { "body": "<string>" }
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({body: JSON.stringify('<string>')})
};
fetch('https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/approvals', 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}/trails/{number}/approvals",
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([
'body' => '<string>'
]),
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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/approvals"
payload := strings.NewReader("{\n \"body\": \"<string>\"\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://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/approvals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/approvals")
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 \"body\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"approval": {
"author": "<string>",
"body": "<string>",
"commit_sha": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"event": "<string>",
"id": "<string>"
},
"gates": {
"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"
},
"ok": true,
"$schema": "/api/v1/schemas/TrailApprovalSubmitResponse.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"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"$schema": "/api/v1/schemas/ProblemDocument.json"
}Authorizations
oauth2bearerAuth
OAuth 2.0 authorization code flow.
Path Parameters
Repo id: placement ULID or public repo_
Trail number
Body
application/json
Was this page helpful?