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>"
}
'{
"created_at": "<string>",
"credential_name": "<string>",
"description": "<string>",
"docker_login": "<string>",
"host": "<string>",
"name": "<string>",
"project": "<string>",
"robot_name": "<string>",
"rotated_at": "<string>",
"scope": "push",
"secret": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Credentials
Create a registry robot
Create a robot account on the organisation's Ankra registry project with push (push and pull) or pull scope. The secret is returned once, in this response, together with the docker login command that uses it; the login is stored as a platform-managed registry credential named ankra-harbor-robot-<name>. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication).
POST
/
api
/
v1
/
org
/
registry-robots
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>"
}
'{
"created_at": "<string>",
"credential_name": "<string>",
"description": "<string>",
"docker_login": "<string>",
"host": "<string>",
"name": "<string>",
"project": "<string>",
"robot_name": "<string>",
"rotated_at": "<string>",
"scope": "push",
"secret": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Successful Response
Available options:
push, pull