Skip to main content

Update Application Image

Update only the container image (name and/or tag) for an existing application without modifying other settings.

Endpoint

PATCH /environments/{envId}/app/{appId}/image

Authentication

Required: Yes (Session or Bearer Token with 2FA)

Path Parameters

ParameterTypeRequiredDescription
envIdstring (UUID)YesEnvironment ID containing the application
appIdstring (UUID)YesApplication ID to update

Request Body

FieldTypeRequiredDescription
imageNamestringYesDocker image name (see formats below)
imageTagstringYesDocker image tag (e.g., "latest", "1.25", "v2.0.0")
containerRegistryIdstring (UUID)NoContainer Registry ID (required for private images)

Image Types and Formats

1. Public Images (No Container Registry Required)

Public images can be used without providing a containerRegistryId:

Docker Hub Public Images:

{
"imageName": "nginx",
"imageTag": "1.25-alpine"
}

Other Public Registries:

{
"imageName": "ghcr.io/organization/public-repo",
"imageTag": "latest"
}

2. Private Images (Container Registry ID Required)

For private images, you must:

  1. First create a Container Registry in Thevenin with your authentication credentials
  2. Include the containerRegistryId in your request

Private Registry Example:

{
"imageName": "myregistry.azurecr.io/private-app",
"imageTag": "v1.0.0",
"containerRegistryId": "550e8400-e29b-41d4-a716-446655440000"
}

Private GitHub Container Registry:

{
"imageName": "ghcr.io/myorg/private-backend",
"imageTag": "production",
"containerRegistryId": "660e8400-e29b-41d4-a716-446655440001"
}

How it works: When you provide a containerRegistryId, the system retrieves the container registry configuration (including credentials) and uses it to authenticate with the registry, validate that the image exists, and ensure your application can pull it at runtime.

Response

Success Response (200 OK)

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-web-app",
"envIdRef": "660e8400-e29b-41d4-a716-446655440001",
"companyIdRef": "770e8400-e29b-41d4-a716-446655440002",
"source": {
"image": {
"name": "nginx",
"tag": "1.25-alpine"
}
},
"resources": {
"cpu": 1000,
"memory": 512,
"storage": 10240
},
"hostname": "my-web-app-abc123",
"port": 80,
"isDeleted": false,
"createdBy": "user-123",
"modifiedBy": "user-456",
"version": 2
}

Error Responses

Status CodeDescription
400Bad Request - Invalid image format or image not found in registry
401Unauthorized - Invalid or missing authentication
403Forbidden - User doesn't have access to this application
404Not Found - Application or environment doesn't exist
500Internal Server Error