post https://api.sixfab.com/v1/assets//alpon/apps
Deploy a new app on the ALPON device. The endpoint uses JSON streaming to return real-time progress events.
The fields name
and image
are required for the app deployment. The deployment will fail if these fields are missing.
Status Types:
There are three types of status events:
- Running: The deployment is in progress.
- Success: The deployment was successful.
- Fail: The deployment failed.
Example of a running status event:
{"status": "Running", "message": "The container is being created."}
Example of a successful result event:
{"status": "Success", "message": "The application 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."}
Possible Error Codes:
- ErrorNoImage: No image provided for the app.
- ErrorNoName: No name provided for the app.
- AssetNotFound: The asset with the specified ID was not found.
- AssetNotAlponDevice: The device is not an ALPON device.
- AppExists: An app 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 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.