import requests
url = "https://platform.ankra.app/api/v1/org/registry-projects"
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-projects', 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-projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"created_at": "<string>",
"host": "<string>",
"is_default": true,
"name": "<string>",
"project": "<string>",
"repository_count": 123,
"robot_count": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create a registry project
Create an extra registry project for the organisation, private and under the same scan policy, retention policy and storage quota as its own. A robot account is bound to one project, so an extra project is how a login is given access to less than everything the organisation publishes. An organisation can hold up to extra_project_limit extra projects. 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-projects"
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-projects', 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-projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"created_at": "<string>",
"host": "<string>",
"is_default": true,
"name": "<string>",
"project": "<string>",
"repository_count": 123,
"robot_count": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
2 to 30 lower-case letters, digits and single hyphens, starting and ending on a letter or digit. default is reserved.
Response
Successful Response
True for the organisation's own project, which cannot be deleted.
What the project is addressed by: default for the organisation's own, otherwise the name it was created under.
The project's name on the registry: the path segment images are pushed under.
How many of the organisation's own robot accounts are bound to the project.