curl --request GET \
--url https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/reviews/{review_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/reviews/{review_id}"
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}/reviews/{review_id}', 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}/reviews/{review_id}",
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}/reviews/{review_id}"
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}/reviews/{review_id}")
.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}/reviews/{review_id}")
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{
"code_version": {
"base_ref": "<string>",
"base_sha": "<string>",
"captured_at": "2023-11-07T05:31:56Z",
"head_ref": "<string>",
"head_sha": "<string>",
"id": "<string>",
"repo_id": "<string>",
"trail_id": "<string>"
},
"comments": [
{
"outgoing_links": [
{
"link_type": "<string>",
"source_comment_id": "<string>",
"target_comment_id": "<string>"
}
],
"suggested_changes": [
{
"change_type": "<string>",
"code_version_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"expected_end_line": 123,
"expected_file_hash": "<string>",
"expected_file_path": "<string>",
"expected_lines": "<string>",
"expected_start_line": 123,
"id": "<string>",
"instruction": "<string>",
"patch": "<string>",
"review_comment_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
],
"counts": {
"dismissed": 123,
"open": 123,
"resolved": 123,
"stale": 123,
"total": 123
},
"event_cursor": "<string>",
"review": {
"actor_id": "<string>",
"code_version_id": "<string>",
"id": "<string>",
"source_execution_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"summary": "<string>",
"trail_id": "<string>"
},
"$schema": "/api/v1/schemas/ReviewSnapshotResponseBody.json",
"next_cursor": "<string>"
}{
"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"
}Change: Get review state (repo_id addressing)
Accepted credentials: User token, Plugin installation token.
A review’s current state, addressed by opaque repo id. Same projection, counts, keyset paging, and event cursor as the wire-parity path.
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 or read_findings permission (contents:read or findings:read for plugin installations). Findings can include code excerpts: location selected_text and nearby_text, and suggested changes. 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}/reviews/{review_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://aws-us-east-2.api.entire.io/api/v1/repos/{repo_id}/changes/{number}/reviews/{review_id}"
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}/reviews/{review_id}', 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}/reviews/{review_id}",
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}/reviews/{review_id}"
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}/reviews/{review_id}")
.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}/reviews/{review_id}")
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{
"code_version": {
"base_ref": "<string>",
"base_sha": "<string>",
"captured_at": "2023-11-07T05:31:56Z",
"head_ref": "<string>",
"head_sha": "<string>",
"id": "<string>",
"repo_id": "<string>",
"trail_id": "<string>"
},
"comments": [
{
"outgoing_links": [
{
"link_type": "<string>",
"source_comment_id": "<string>",
"target_comment_id": "<string>"
}
],
"suggested_changes": [
{
"change_type": "<string>",
"code_version_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"expected_end_line": 123,
"expected_file_hash": "<string>",
"expected_file_path": "<string>",
"expected_lines": "<string>",
"expected_start_line": 123,
"id": "<string>",
"instruction": "<string>",
"patch": "<string>",
"review_comment_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
],
"counts": {
"dismissed": 123,
"open": 123,
"resolved": 123,
"stale": 123,
"total": 123
},
"event_cursor": "<string>",
"review": {
"actor_id": "<string>",
"code_version_id": "<string>",
"id": "<string>",
"source_execution_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"summary": "<string>",
"trail_id": "<string>"
},
"$schema": "/api/v1/schemas/ReviewSnapshotResponseBody.json",
"next_cursor": "<string>"
}{
"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"
}Query Parameters
Response
OK
Was this page helpful?