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_name": "<string>",
"projects": [
"<string>"
],
"robot_name": "<string>",
"rotated_at": "<string>",
"scope": "push",
"secret": "<string>",
"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_name": "<string>",
"projects": [
"<string>"
],
"robot_name": "<string>",
"rotated_at": "<string>",
"scope": "push",
"secret": "<string>",
"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.
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. A robot is a project-level robot, so this is the one project it was minted on.
The preset the grants amount to, or custom when they are neither preset.
push, pull, custom Set when the registry answered the secret but the platform could not store or record it: this response is then the only copy.