import requests
url = "https://platform.ankra.app/api/v1/org/ai-gateway/scm-bindings/{provider}/{binding_external_id}/repo-overrides"
payload = {
"repo_full_name": "<string>",
"ai_review": True,
"mention_replies": True,
"pr_previews": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
repo_full_name: '<string>',
ai_review: true,
mention_replies: true,
pr_previews: true
})
};
fetch('https://platform.ankra.app/api/v1/org/ai-gateway/scm-bindings/{provider}/{binding_external_id}/repo-overrides', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/ai-gateway/scm-bindings/{provider}/{binding_external_id}/repo-overrides \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"repo_full_name": "<string>",
"ai_review": true,
"mention_replies": true,
"pr_previews": true
}
'{
"success": true,
"provider": "<string>",
"binding_external_id": "<string>",
"repo_full_name": "<string>",
"ai_review": true,
"mention_replies": true,
"pr_previews": true,
"review_model": "<string>",
"review_drafts": true,
"max_reviews_per_pr": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Set a repository's AI review rule on a source-control binding
Organisation admin only. Writes one repository’s own switches on the binding, which then apply to that repository instead of the binding-level settings: ai_review turns the AI review on or off for the repository. repo_full_name, ai_review, mention_replies and pr_previews are required; review_model, review_drafts and max_reviews_per_pr are optional and an omitted member keeps its stored value. Writing the same repository again replaces its rule.
import requests
url = "https://platform.ankra.app/api/v1/org/ai-gateway/scm-bindings/{provider}/{binding_external_id}/repo-overrides"
payload = {
"repo_full_name": "<string>",
"ai_review": True,
"mention_replies": True,
"pr_previews": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
repo_full_name: '<string>',
ai_review: true,
mention_replies: true,
pr_previews: true
})
};
fetch('https://platform.ankra.app/api/v1/org/ai-gateway/scm-bindings/{provider}/{binding_external_id}/repo-overrides', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/ai-gateway/scm-bindings/{provider}/{binding_external_id}/repo-overrides \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"repo_full_name": "<string>",
"ai_review": true,
"mention_replies": true,
"pr_previews": true
}
'{
"success": true,
"provider": "<string>",
"binding_external_id": "<string>",
"repo_full_name": "<string>",
"ai_review": true,
"mention_replies": true,
"pr_previews": true,
"review_model": "<string>",
"review_drafts": true,
"max_reviews_per_pr": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The source-control provider of the binding: github, gitlab or bitbucket.
The provider's own id of the binding: the GitHub App installation id, the GitLab or Bitbucket credential id.
Body
The repository, as owner/repository.
An organisation model-catalog key or an exact OpenRouter model id; the empty string inherits the binding-level selection; omitted keeps the stored value.
Omitted keeps the stored value.
0 means no cap; omitted keeps the stored value.