import requests
url = "https://platform.ankra.app/api/v1/org/registry-connections/discover"
payload = {
"admin_credential_name": "<string>",
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({admin_credential_name: '<string>', url: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/registry-connections/discover', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/registry-connections/discover \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"admin_credential_name": "<string>",
"url": "<string>"
}
'{
"detail": "<string>",
"host": "<string>",
"ok": true,
"projects": [
{
"name": "<string>",
"public": true,
"repository_count": 123
}
],
"provider": "harbor",
"truncated": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Discover a registry connection
Discover what an admin credential sees on a registry before any registry entry points at it: Ankra acts as the credential, over the same SSRF-guarded client the robot lane uses, and lists the projects (Harbor, up to 500 by name, truncated true past that) or the Docker repositories (Google Artifact Registry; only the named one when the URL names a repository) robots and registry entries can be made for. Nothing is written or minted. A connection that fails - the credential refused, the registry unreachable, a credential that cannot be used there, a Google URL naming no project, or a registry Ankra cannot make robots on - answers 200 with ok false, no projects and a sentence saying why. A credential the platform manages is refused (422). Requires credentials.write and credentials.reveal. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication, CSRF-guarded).
import requests
url = "https://platform.ankra.app/api/v1/org/registry-connections/discover"
payload = {
"admin_credential_name": "<string>",
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({admin_credential_name: '<string>', url: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/registry-connections/discover', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/registry-connections/discover \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"admin_credential_name": "<string>",
"url": "<string>"
}
'{
"detail": "<string>",
"host": "<string>",
"ok": true,
"projects": [
{
"name": "<string>",
"public": true,
"repository_count": 123
}
],
"provider": "harbor",
"truncated": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
Response
Successful Response