Start a code review (repo_id addressing)
curl --request POST \
--url https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/reviews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actor_id": "<string>",
"base_ref": "<string>",
"base_sha": "<string>",
"head_ref": "<string>",
"head_sha": "<string>"
}
'import requests
url = "https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/reviews"
payload = {
"actor_id": "<string>",
"base_ref": "<string>",
"base_sha": "<string>",
"head_ref": "<string>",
"head_sha": "<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({
actor_id: '<string>',
base_ref: '<string>',
base_sha: '<string>',
head_ref: '<string>',
head_sha: '<string>'
})
};
fetch('https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/reviews', 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}/reviews",
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([
'actor_id' => '<string>',
'base_ref' => '<string>',
'base_sha' => '<string>',
'head_ref' => '<string>',
'head_sha' => '<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}/reviews"
payload := strings.NewReader("{\n \"actor_id\": \"<string>\",\n \"base_ref\": \"<string>\",\n \"base_sha\": \"<string>\",\n \"head_ref\": \"<string>\",\n \"head_sha\": \"<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}/reviews")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"actor_id\": \"<string>\",\n \"base_ref\": \"<string>\",\n \"base_sha\": \"<string>\",\n \"head_ref\": \"<string>\",\n \"head_sha\": \"<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}/reviews")
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 \"actor_id\": \"<string>\",\n \"base_ref\": \"<string>\",\n \"base_sha\": \"<string>\",\n \"head_ref\": \"<string>\",\n \"head_sha\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"base_sha": "<string>",
"code_version_id": "<string>",
"diff_url": "<string>",
"event_stream_url": "<string>",
"files_url": "<string>",
"head_sha": "<string>",
"limits": {
"max_comments_per_batch": 123
},
"repo_id": "<string>",
"review_id": "<string>",
"trail_id": "<string>",
"$schema": "/api/v1/schemas/StartReviewResponseBody.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"
}Reviews
Start a code review (repo_id addressing)
POST
/
repos
/
{repo_id}
/
trails
/
{number}
/
reviews
Start a code review (repo_id addressing)
curl --request POST \
--url https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/reviews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actor_id": "<string>",
"base_ref": "<string>",
"base_sha": "<string>",
"head_ref": "<string>",
"head_sha": "<string>"
}
'import requests
url = "https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/reviews"
payload = {
"actor_id": "<string>",
"base_ref": "<string>",
"base_sha": "<string>",
"head_ref": "<string>",
"head_sha": "<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({
actor_id: '<string>',
base_ref: '<string>',
base_sha: '<string>',
head_ref: '<string>',
head_sha: '<string>'
})
};
fetch('https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/trails/{number}/reviews', 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}/reviews",
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([
'actor_id' => '<string>',
'base_ref' => '<string>',
'base_sha' => '<string>',
'head_ref' => '<string>',
'head_sha' => '<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}/reviews"
payload := strings.NewReader("{\n \"actor_id\": \"<string>\",\n \"base_ref\": \"<string>\",\n \"base_sha\": \"<string>\",\n \"head_ref\": \"<string>\",\n \"head_sha\": \"<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}/reviews")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"actor_id\": \"<string>\",\n \"base_ref\": \"<string>\",\n \"base_sha\": \"<string>\",\n \"head_ref\": \"<string>\",\n \"head_sha\": \"<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}/reviews")
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 \"actor_id\": \"<string>\",\n \"base_ref\": \"<string>\",\n \"base_sha\": \"<string>\",\n \"head_ref\": \"<string>\",\n \"head_sha\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"base_sha": "<string>",
"code_version_id": "<string>",
"diff_url": "<string>",
"event_stream_url": "<string>",
"files_url": "<string>",
"head_sha": "<string>",
"limits": {
"max_comments_per_batch": 123
},
"repo_id": "<string>",
"review_id": "<string>",
"trail_id": "<string>",
"$schema": "/api/v1/schemas/StartReviewResponseBody.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.
Headers
Optional replay-safe key; a retried request with the same key and body returns the cached response instead of re-executing.
Path Parameters
Repo id: placement ULID or public repo_
Trail number
Body
application/json
Response
Created
Show child attributes
Show child attributes
A URL to the JSON Schema for this object.
Example:
"/api/v1/schemas/StartReviewResponseBody.json"
Was this page helpful?