Change a cluster context repository
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/context-repos/{context_repo_id}"
payload = {
"branch": "<string>",
"note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({branch: '<string>', note: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/context-repos/{context_repo_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/context-repos/{context_repo_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branch": "<string>",
"note": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "github",
"repo_owner": "<string>",
"repo_name": "<string>",
"branch": "<string>",
"note": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Clusters
Change a cluster context repository
The bearer twin of the portal’s AI context repository editor, for the Ankra app and scripts. Changes the branch or the note of a tagged repository; a field left out stays, an explicit null clears it. Requires clusters.write on the cluster.
PATCH
/
api
/
v1
/
org
/
clusters
/
{cluster_id}
/
context-repos
/
{context_repo_id}
Change a cluster context repository
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/context-repos/{context_repo_id}"
payload = {
"branch": "<string>",
"note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({branch: '<string>', note: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/context-repos/{context_repo_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/context-repos/{context_repo_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branch": "<string>",
"note": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "github",
"repo_owner": "<string>",
"repo_name": "<string>",
"branch": "<string>",
"note": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Body
application/json
Response
The tagged repository.
A repository tagged on a cluster as context for Ankra AI.