Stop a running container
post
/api/v2/containers/{container_id}/stop
Stops a specific running container, identified by the container_id parameter.
Request
Path Parameters
-
container_id: string
container_id
Security
-
Authorization: apiKey
Type:
apiKey
Response
Supported Media Types
- application/json
200 Response
200 Response
Default Response
Error Payload
Examples
The following example shows how to stop a specific container. You perform this task by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.
Note: The command in this example uses the URL structure https://rest_server_url/resource-path
, where rest_server_url
is the manager node for the Oracle Cloud Container instance. See Send Requests for the appropriate URL structure to use for Oracle Public Cloud.
cURL Command
curl -sk
-X "POST"
-H "Authorization: Bearer b39f09c71c297f1d"
"https://rest_server_url/api/v2/containers/853f5d8afd3dd530f31ed9292ac721644b058779c25c1e698eb2d738c641b613/stop"
Example of Response Body
{
"task_id": "03cd6e77-9245-4f22-90d2-d1f70214f0f2"
}