Get Code Review
curl --request GET \
--url https://getunblocked.com/api/v1/code-reviews/{reviewId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://getunblocked.com/api/v1/code-reviews/{reviewId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://getunblocked.com/api/v1/code-reviews/{reviewId}', 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://getunblocked.com/api/v1/code-reviews/{reviewId}",
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://getunblocked.com/api/v1/code-reviews/{reviewId}"
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://getunblocked.com/api/v1/code-reviews/{reviewId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getunblocked.com/api/v1/code-reviews/{reviewId}")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "processing",
"headSha": "8a1b2c3d4e5f678901234567890123456789abcd",
"prUrl": "https://github.com/acme/backend/pull/123",
"headBranch": "feature/add-validation",
"baseBranch": "main",
"trigger": "Public API",
"deepReview": true,
"error": "Unable to retrieve the pull request diff.",
"comments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filePath": "src/auth/session.kt",
"lineSide": "right",
"startLine": 42,
"endLine": 45,
"category": "LogicError",
"title": "Expired sessions remain valid",
"description": "Check the session expiration before allowing the request."
}
]
}{
"message": "<string>",
"documentationUrl": "<string>"
}Code Reviews
Get Code Review
Retrieve a code review for the authenticated team, including automatic, manually requested,
and API-created reviews. Existing repository access restrictions apply to Personal Access Tokens.
Poll while the status is processing. Results are available when the status is complete.
A failed result includes an error message. The head commit SHA identifies the analyzed revision,
even if the pull request has since changed.
GET
/
code-reviews
/
{reviewId}
Get Code Review
curl --request GET \
--url https://getunblocked.com/api/v1/code-reviews/{reviewId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://getunblocked.com/api/v1/code-reviews/{reviewId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://getunblocked.com/api/v1/code-reviews/{reviewId}', 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://getunblocked.com/api/v1/code-reviews/{reviewId}",
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://getunblocked.com/api/v1/code-reviews/{reviewId}"
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://getunblocked.com/api/v1/code-reviews/{reviewId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getunblocked.com/api/v1/code-reviews/{reviewId}")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "processing",
"headSha": "8a1b2c3d4e5f678901234567890123456789abcd",
"prUrl": "https://github.com/acme/backend/pull/123",
"headBranch": "feature/add-validation",
"baseBranch": "main",
"trigger": "Public API",
"deepReview": true,
"error": "Unable to retrieve the pull request diff.",
"comments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filePath": "src/auth/session.kt",
"lineSide": "right",
"startLine": 42,
"endLine": 45,
"category": "LogicError",
"title": "Expired sessions remain valid",
"description": "Check the session expiration before allowing the request."
}
]
}{
"message": "<string>",
"documentationUrl": "<string>"
}Authorizations
Path Parameters
The reviewId from List Code Review Usage or the ID returned by Create Code Review.
The ID of a resource that can be retrieved from the service.
Response
OK - The current status and available result