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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The organisation's registry credential to act as.
The registry, as a host or an oci:// or https:// URL. A Harbor URL may name a project, which is ignored; a Google Artifact Registry URL names at least the Google Cloud project (oci://-docker.pkg.dev/[/], oci://gcr.io/).
Response
Successful Response
A sentence saying what Ankra reached and saw, or why it could not.
True when the admin credential could list the registry's projects.
The projects (Harbor) or Docker repositories (Google Artifact Registry) the credential sees, by name; empty when ok is false.
Show child attributes
Show child attributes
harbor, google_artifact_registry, oci True when the registry holds more than the 500 projects answered.