Container Registry
A container registry holds the credentials used to pull private images. Its ID
is what a service passes as containerRegistryId when
creating a stack.
All requests go to the Run-App gateway and need the authentication headers.
Registry List
Query · container_listContainerRegistry
Returns a paginated list of container registries.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
pager | container_PagerInput | No | Pagination options |
pager
| Field | Type | Required | Description |
|---|---|---|---|
page | Number | Yes | The number of current page |
limit | Number | Yes | The number of limit data |
Variables
{
"subscriptionId": "67ab067f092e8f8c2beb2df5",
"pager": {
"page": 1,
"limit": 100
}
}
This sample includes subscriptionId, but the query accepts only pager.
Request
query listContainerRegistry($pager: container_PagerInput) {
container_listContainerRegistry(pager: $pager) {
containerRegistries {
createdAt
host
id
mysabayUserId
name
updatedAt
userAccess
}
pagination {
currentPage
from
lastPage
perPage
to
total
}
}
}
Response
{
"data": {
"container_listContainerRegistry": {
"containerRegistries": [
{
"createdAt": 1725417988748,
"host": "example-registry-edit.com",
"id": "66d7ca042d67cb0ada9d8408",
"mysabayUserId": 39555695,
"name": "custom",
"updatedAt": 1725421468701,
"userAccess": {
"username": "registry name edit"
}
},
{
"createdAt": 1730883024046,
"host": "example-registry.com",
"id": "672b2dd0a706d0ef04a59c3d",
"mysabayUserId": 39555695,
"name": "docker_hub",
"updatedAt": 0,
"userAccess": {
"username": "test"
}
}
],
"pagination": {
"currentPage": 1,
"from": 1,
"lastPage": 1,
"perPage": 50,
"to": 2,
"total": 2
}
}
}
}
userAccess is selected without a sub-selection in the query, but the response
returns an object containing username. The sample also requests limit: 100
while the response reports "perPage": 50.
Registry Information
Query · container_getContainerRegistryById
Returns a single container registry.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
containerRegistryId | String | Yes | The ID of the registry |
Variables
{
"subscriptionId": "67ab067f092e8f8c2beb2df5",
"containerRegistryId": "66d7ca042d67cb0ada9d8408"
}
This sample includes subscriptionId, but the query accepts only
containerRegistryId.
Request
query Container_getContainerRegistryById($containerRegistryId: String!) {
container_getContainerRegistryById(
containerRegistryId: $containerRegistryId
) {
id
mysabayUserId
name
host
userAccess
createdAt
updatedAt
}
}
Response
{
"data": {
"container_getContainerRegistryById": {
"id": "66d7ca042d67cb0ada9d8408",
"mysabayUserId": 39555695,
"name": "custom",
"host": "example-registry-edit.com",
"userAccess": {
"username": "registry name edit"
},
"createdAt": 1725417988748,
"updatedAt": 1725421468701
}
}
}
Registry Providers
Query · container_listContainerRegistryProvider
Returns the supported container registry providers. Takes no arguments.
Request
query listRegistryProvider {
container_listContainerRegistryProvider {
containerRegistryProviders
}
}
Response
{
"data": {
"container_listContainerRegistryProvider": {
"containerRegistryProviders": {
"custom": "Custom",
"docker_hub": "Docker Hub",
"gitlab": "Gitlab"
}
}
}
}
Create Registry
Mutation · container_createContainerRegistry
Creates a container registry.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
input | container_CreateContainerRegistryInput | Yes | Registry configuration |
input
| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | The name of registry |
host | String | Yes | The host of registry |
username | String | Yes | The username of registry |
accessToken | String | Yes | The accessToken of registry |
Variables
{
"input": {
"username": "admin",
"name": "custom",
"host": "test.com",
"accessToken": "12345"
}
}
Request
mutation createRegistry($input: container_CreateContainerRegistryInput!) {
container_createContainerRegistry(input: $input) {
id
mysabayUserId
name
host
userAccess
createdAt
updatedAt
}
}
Response
{
"data": {
"container_createContainerRegistry": {
"id": "674ebff6c12192a423b48b2d",
"mysabayUserId": 39555695,
"name": "custom",
"host": "nasfong.com",
"userAccess": {
"username": "admin"
},
"createdAt": 1733214198413,
"updatedAt": 0
}
}
}
Update Registry
Mutation · container_updateContainerRegistry
Updates an existing container registry.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
input | container_UpdateContainerRegistryInput | Yes | Registry configuration |
input
| Field | Type | Required | Description |
|---|---|---|---|
containerRegistryId | String | Yes | ID of registry |
host | String | Yes | The host of registry |
username | String | Yes | The username of registry |
accessToken | String | Yes | The accessToken of registry |
Variables
{
"input": {
"username": "admin",
"host": "test.com",
"containerRegistryId": "674ebff6c12192a423b48b2d",
"accessToken": "12345"
}
}
Request
mutation updateRegistry($input: container_UpdateContainerRegistryInput!) {
container_updateContainerRegistry(input: $input) {
id
mysabayUserId
name
host
userAccess
createdAt
updatedAt
}
}
Response
{
"data": {
"container_updateContainerRegistry": {
"id": "674ebff6c12192a423b48b2d",
"mysabayUserId": 39555695,
"name": "custom",
"host": "nasfong.com",
"userAccess": {
"username": "admin"
},
"createdAt": 1733214198413,
"updatedAt": 1733214222662
}
}
}
Remove Registry
Mutation · container_deleteContainerRegistryById
Removes a container registry.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
containerRegistryId | String | Yes | The ID of the registry |
Variables
{
"containerRegistryId": "674ebff6c12192a423b48b2d"
}
Request
mutation Container_deleteContainerRegistryById($containerRegistryId: String!) {
container_deleteContainerRegistryById(
containerRegistryId: $containerRegistryId
) {
message
success
}
}
Response
{
"data": {
"container_deleteContainerRegistryById": {
"message": "Registry delete successfully",
"success": true
}
}
}