from gcore import Gcore
client = Gcore(
api_key="My API Key",
)
registry_artifact_list = client.cloud.registries.artifacts.list(
repository_name="repository_name",
project_id=0,
region_id=0,
registry_id=0,
)
print(registry_artifact_list.count)
{
"count": 1,
"results": [
{
"digest": "sha256:5414002a0c147f8e41da0d0764b5074480012852d5d9a0ef8bd2fec904e62b7c",
"id": 1,
"pulled_at": "2024-06-18T09:36:53.335000Z",
"pushed_at": "2024-06-18T09:36:53.335000Z",
"registry_id": 1,
"repository_id": 1,
"size": 1,
"tags": [
{
"artifact_id": 1,
"id": 1,
"name": "v0.0.1",
"pulled_at": "2024-06-18T09:36:53.335000Z",
"pushed_at": "2024-06-18T09:36:53.335000Z",
"repository_id": 5
},
{
"artifact_id": 1,
"id": 2,
"name": "latest",
"pulled_at": "2024-06-18T09:36:53.335000Z",
"pushed_at": "2024-06-18T09:36:53.335000Z",
"repository_id": 5
}
]
}
]
}
List all artifacts in a specific repository.
from gcore import Gcore
client = Gcore(
api_key="My API Key",
)
registry_artifact_list = client.cloud.registries.artifacts.list(
repository_name="repository_name",
project_id=0,
region_id=0,
registry_id=0,
)
print(registry_artifact_list.count)
{
"count": 1,
"results": [
{
"digest": "sha256:5414002a0c147f8e41da0d0764b5074480012852d5d9a0ef8bd2fec904e62b7c",
"id": 1,
"pulled_at": "2024-06-18T09:36:53.335000Z",
"pushed_at": "2024-06-18T09:36:53.335000Z",
"registry_id": 1,
"repository_id": 1,
"size": 1,
"tags": [
{
"artifact_id": 1,
"id": 1,
"name": "v0.0.1",
"pulled_at": "2024-06-18T09:36:53.335000Z",
"pushed_at": "2024-06-18T09:36:53.335000Z",
"repository_id": 5
},
{
"artifact_id": 1,
"id": 2,
"name": "latest",
"pulled_at": "2024-06-18T09:36:53.335000Z",
"pushed_at": "2024-06-18T09:36:53.335000Z",
"repository_id": 5
}
]
}
]
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
Project ID
Region ID
Registry ID
Repository name If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
List of artifacts
The response is of type object
.
Was this page helpful?