import requests
url = "https://platform.ankra.app/api/v1/org/registry-robots"
payload = { "name": "<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({name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/registry-robots', 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-robots \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"application": {
"id": "<string>",
"name": "<string>"
},
"created_at": "<string>",
"credential_name": "<string>",
"description": "<string>",
"docker_login": "<string>",
"expires_at": "<string>",
"host": "<string>",
"kind": "user",
"managed": true,
"name": "<string>",
"permissions": [
"<string>"
],
"project": "<string>",
"project_access": [
{
"permissions": [
"<string>"
],
"project": "<string>",
"project_name": "<string>",
"scope": "push"
}
],
"project_name": "<string>",
"projects": [
"<string>"
],
"robot_name": "<string>",
"rotated_at": "<string>",
"scope": "push",
"secret": "<string>",
"account_email": "<string>",
"provider": "harbor",
"warning": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create a registry robot
import requests
url = "https://platform.ankra.app/api/v1/org/registry-robots"
payload = { "name": "<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({name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/registry-robots', 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-robots \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"application": {
"id": "<string>",
"name": "<string>"
},
"created_at": "<string>",
"credential_name": "<string>",
"description": "<string>",
"docker_login": "<string>",
"expires_at": "<string>",
"host": "<string>",
"kind": "user",
"managed": true,
"name": "<string>",
"permissions": [
"<string>"
],
"project": "<string>",
"project_access": [
{
"permissions": [
"<string>"
],
"project": "<string>",
"project_name": "<string>",
"scope": "push"
}
],
"project_name": "<string>",
"projects": [
"<string>"
],
"robot_name": "<string>",
"rotated_at": "<string>",
"scope": "push",
"secret": "<string>",
"account_email": "<string>",
"provider": "harbor",
"warning": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Days until the registry stops honouring the robot. Omitted or null: it never expires.
1 <= x <= 3650The robot's own grants, each one of available_permissions from the listing, instead of a preset scope. Push carries pull with it. Stating both a preset scope and permissions is refused, and so is either beside projects.
The registry project the robot is bound to: omitted, null or default for the organisation's own, otherwise the name of one of its extra projects. A robot reaches that one project and no other. Refused beside projects.
Every project a robot reaching several is bound to, 2 to 20 different ones, each with its own scope or permissions. A list of one is the same create as project. Refused beside project, scope or permissions. On the Ankra registry the robot is one Harbor system-level robot limited to the organisation's own projects; on an integrated Harbor that needs a system administrator admin credential; on Google Artifact Registry the one service account is bound on every repository.
20Show child attributes
Show child attributes
A preset: push (push and pull) or pull. Defaults to push when neither a scope nor permissions are stated. custom is only accepted beside permissions.
push, pull, custom Response
Successful Response
The application an application robot belongs to; null for every other kind, and for one whose application is gone.
Show child attributes
Show child attributes
The registry credential holding the login. Unique across the listing, which a robot's name is not.
When the registry stops honouring the robot; null for one that never expires.
Who the robot belongs to: a member (user), organisation provisioning (organisation: the ci and pull robots) or one application (application).
user, organisation, application True for a robot Ankra minted and whose secret it fans out itself. It is listed and read here, never rotated or revoked.
A member's robot: the name it was created under. A managed robot: ci, pull, or app-.
Every grant the robot holds, written resource:action; for a robot reaching several projects, every grant it holds on any of them.
Every project the robot reaches with the grants it holds there: one entry for a robot bound to one project, several for a robot reaching several, none for a managed robot whose project cannot be read.
Show child attributes
Show child attributes
What a member addresses the project by: default for the organisation's own, the name it was created under for an extra project, and empty for a project on a registry the organisation runs itself.
Every registry project the robot reaches; project and project_name are the first of them.
The preset the grants amount to, or custom when they are neither preset. For a robot reaching several projects, the preset every project holds alike, or custom when they differ.
push, pull, custom The service account a robot on Google Artifact Registry is; absent on Harbor.
The kind of registry the robot lives on: harbor for the Ankra registry and any integrated Harbor, google_artifact_registry for an integrated Google Artifact Registry.
harbor, google_artifact_registry Set when the registry answered the secret but the platform could not store or record it: this response is then the only copy.