Skip to main content

Stop Deployment Container

Endpoint Description

POST /vendors/v1/machines/deployments/{deployment_id}/stop

This endpoint stops a container deployment on a specified machine. It requires authentication X-API-Key to access. The request must include the deployment ID to identify the running container instance that needs to be stopped.

Request Body Description

The request body for stopping a deployment container must be a JSON object containing the following fields:

Fields

  • metadata: object
    • Clore-specific data needed for integration.
    • Contains the following sub-fields:
    • Must be a non-empty string.
    • Additional key-value pairs for other Clore-specific data.

Request Parameters

The request parameters for stopping a deployment container must be specified in the URL path.

Parameters

  • deployment_id: string
    • The unique identifier for the deployment of the container that needs to be stopped.

Example Request

POST /vendors/v1/machines/deployments/a1b2c3d4-5678-90ef-ghij-klmnopqrstuv/stop

Success Response

Status Code: 200 OK

Response Body Description

The response body contains the deployment ID for the stopped container deployment.

Fields

  • deployment_id: string
    • The unique identifier for the deployment that was stopped.

Example Response Body

{
"deployment_id": "a1b2c3d4-5678-90ef-ghij-klmnopqrstuv"
}

HTTP Status Codes

The "Stop Deployment Container" endpoint may return the following HTTP status codes based on the outcome of the request:

  • 200 OK: The request was successful, and the response body contains the deployment ID.
  • 400 Bad Request: The server could not understand the request due to invalid syntax. This status is typically returned if required fields are missing or incorrectly formatted.
  • 401 Unauthorized: The request lacks valid authentication credentials for the target resource. This status indicates that the client must authenticate themselves to get the requested response.
  • 403 Forbidden: The server understood the request but refuses to authorize it. This typically means the requester doesn't have the required roles to access the resource.
  • 404 Not Found: The requested resource could not be found. This status may be returned if the deployment ID is incorrect.
  • 500 Internal Server Error: The server encountered an unexpected condition that prevented it from fulfilling the request. This is a generic error message when no specific message is suitable.

Example cURL Request

curl -X POST "https://api.hiveon.ai/vendors/v1/machines/deployments/a1b2c3d4-5678-90ef-ghij-klmnopqrstuv/stop" \
-H "Content-Type: application/json" \
-H 'X-API-Key: <your_api_key>' \
-d '{
"metadata": {
"CLORE_API_KEY": "your-clore-api-key",
"additional_key": "additional_value"
}
}'

This cURL command stops the container deployment on a specified machine, using the provided deployment ID and Clore-specific metadata.