Deploy Container (JSON Stream)

Deploy a new container on the ALPON device. The endpoint uses JSON streaming to return real-time progress events.
The fields name and image are required for the container deployment. The deployment will fail if these fields are missing.

Status Types:
There are five types of statuses:

  • Downloading: The image is being downloaded.
  • Unpacking: The image is being unpacked.
  • Running: The deployment is in progress.
  • Success: The deployment was successful.
  • Fail: The deployment failed.

Example of a downloading status event:

{"status": "Downloading", "message": "Downloading the image.", "percentage": 0}

Example of an unpacking status event:

{"status": "Unpacking", "message": "Unpacking the image."}

Example of a running status event:

{"status": "Running", "message": "The container is being created."}

Example of a successful result event:

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

Example of a failed result event:

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

Note: The Downloading and Unpacking statuses are only supported on devices running bundle version 25.1.19.X or higher.

Possible Error Codes:

  • ErrorNoImage: No image provided for the container.
  • ErrorNoName: No name provided for the container.
  • AssetNotFound: The asset with the specified ID was not found.
  • AssetNotAlponDevice: The device is not an ALPON device.
  • ContainerExists: A container with the same name already exists.
  • 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 container is crashing repeatedly. This could be due to a misconfiguration in the container. Please check the container 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 container 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!