import requests
url = "https://platform.ankra.app/api/v1/org/registry-robots/{robot_name}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/registry-robots/{robot_name}/rotate', 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/{robot_name}/rotate \
--header 'Authorization: Bearer <token>'{
"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>"
}
]
}Rotate a registry robot's secret
Mint a new secret for the robot and return it once. The previous secret stops working. A robot the registry no longer has is minted again under the same name with its recorded permissions and the rest of its lifetime. A rotation never extends a robot: an expired one, and a robot Ankra manages, are refused with 409. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication).
import requests
url = "https://platform.ankra.app/api/v1/org/registry-robots/{robot_name}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/registry-robots/{robot_name}/rotate', 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/{robot_name}/rotate \
--header 'Authorization: Bearer <token>'{
"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.
Path Parameters
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.