Update an existing app on the ALPON device using JSON streaming for real-time progress tracking.

To update an app, you can provide only the fields you want to update. The endpoint will fallback
to the existing values for the fields not provided. If you want to remove ports, volumes, or environments,
you need to provide an empty list or dictionary for the respective field.

Example Request Body for removing ports, volumes, and environments:

{
    "ports": [],
    "volumes": [],
    "environments": {}
}

Note:

  • The app name cannot be updated.
  • For the fields ports and volumes, the entire list must be provided. If you want to update only one item in the list, you need to provide the entire list with the updated item. And every item in the list must have all the fields.

Status Types:
There are three types of status events:

  • Running: The update is in progress.
  • Success: The update was successful.
  • Fail: The update failed.

Example of a running status event:

{"message": "The update is in progress. The container is being updated.", "status": "Running"}

Example of a successful result event:

{"status": "Success", "message": "The application has been updated successfully and is running."}

Example of a failed result event:

{"status": "Fail", "message": "Error binding request to the server. Please try again."}

Possible Error Codes:

  • AssetNotFound: The asset with the specified ID was not found.
  • AssetNotAlponDevice: The device is not an ALPON device.
  • AppNotFound: The app with the specified name was not found.
  • ErrorNodePortIsNotCorrectRange: Port is not in the correct range. The range of valid ports is 30000-32767.
  • ErrorBindingRequest: Error binding request to the server. Please try again.
  • ErrorPortInUse: The desired port is already in use by another container. Please choose a different port.
  • ErrorDeploymentAlreadyExist: Deployment already exists.
  • ErrorSaveDeploymentToFile: Error saving deployment to file. Please try again.
  • ErrorNameExists: A container with the same name already exists.
  • ErrorControlLoopAlreadyRunning: Control loop is already running. Please try again in a few seconds.
  • ImagePullBackOff: Failed to fetch/pull the image from the requested registry. The image might be private or unavailable. Please verify the image name and credentials, then try again.
  • CrashLoopBackOff: The application is crashing repeatedly. This could be due to a misconfiguration in the container. Please check the application logs and try to resolve the issue.
  • CreateContainerConfigError: There is an error in the container's configuration preventing it from starting. Please verify the configuration settings and try again.
  • CreateContainerError: An error occurred while trying to create the container. Please ensure all necessary resources are available and try again.
  • InvalidImageName: The provided image name is invalid. Please ensure the image name follows the correct format and try again.
  • RunContainerError: An error occurred while starting the container. Please check the application logs for more details and try again.
  • ErrImageNeverPull: The image is not present locally and is set to never pull. Please update your configuration to allow image pulling or provide the image locally.
  • Unknown: An unknown error occurred. Please try again later or contact support if the issue persists.
  • DeviceNotReachable: The device is not reachable.
Language
Credentials
Header
Click Try It! to start a request and see the response here!