Get an AI code review
import requests
url = "https://platform.ankra.app/api/v1/org/ai-gateway/code-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://platform.ankra.app/api/v1/org/ai-gateway/code-reviews/{review_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/ai-gateway/code-reviews/{review_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "github",
"repo_owner": "<string>",
"repo_name": "<string>",
"pull_request_number": 123,
"pull_request_title": "<string>",
"pull_request_url": "<string>",
"head_sha": "<string>",
"verdict": "approve",
"summary": "<string>",
"model": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"findings": [
{
"fingerprint": "<string>",
"severity": "<string>",
"file": "<string>",
"title": "<string>",
"detail": "<string>",
"outcome": "addressed",
"outcome_observed_at": "<string>",
"line": 123,
"start_line": 123
}
],
"findings_unreadable": true
}AI Environment
Get an AI code review
One pull request review in full: its summary, verdict, model, a link to the pull request, and each finding with its file, line, severity and what became of it. Another organisation’s review answers 404.
GET
/
api
/
v1
/
org
/
ai-gateway
/
code-reviews
/
{review_id}
Get an AI code review
import requests
url = "https://platform.ankra.app/api/v1/org/ai-gateway/code-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://platform.ankra.app/api/v1/org/ai-gateway/code-reviews/{review_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/ai-gateway/code-reviews/{review_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "github",
"repo_owner": "<string>",
"repo_name": "<string>",
"pull_request_number": 123,
"pull_request_title": "<string>",
"pull_request_url": "<string>",
"head_sha": "<string>",
"verdict": "approve",
"summary": "<string>",
"model": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"findings": [
{
"fingerprint": "<string>",
"severity": "<string>",
"file": "<string>",
"title": "<string>",
"detail": "<string>",
"outcome": "addressed",
"outcome_observed_at": "<string>",
"line": 123,
"start_line": 123
}
],
"findings_unreadable": true
}Authorizations
Response
Successful Response
One AI pull request review in full.