Verify a GitHub credential's connection
import requests
url = "https://platform.ankra.app/api/v1/org/credentials/github/{credential_id}/verify"
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/credentials/github/{credential_id}/verify', 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/credentials/github/{credential_id}/verify \
--header 'Authorization: Bearer <token>'{
"steps": [
{
"name": "<string>",
"status": "<string>",
"error_class": "<string>",
"error_message": "<string>",
"latency_ms": 123
}
],
"passed": true,
"cached": true,
"cached_at": "2023-11-07T05:31:56Z"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Credentials
Verify a GitHub credential's connection
Checks, step by step, that the credential’s GitHub App installation still answers, and records the run in the audit log. A recent answer is served from a short cache with cached true. A credential that is not backed by a GitHub App installation answers 409; one held to another project answers 404. Requires credentials.write.
GET
/
api
/
v1
/
org
/
credentials
/
github
/
{credential_id}
/
verify
Verify a GitHub credential's connection
import requests
url = "https://platform.ankra.app/api/v1/org/credentials/github/{credential_id}/verify"
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/credentials/github/{credential_id}/verify', 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/credentials/github/{credential_id}/verify \
--header 'Authorization: Bearer <token>'{
"steps": [
{
"name": "<string>",
"status": "<string>",
"error_class": "<string>",
"error_message": "<string>",
"latency_ms": 123
}
],
"passed": true,
"cached": true,
"cached_at": "2023-11-07T05:31:56Z"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.