Queue a container lifecycle action
POST
/container/{ocid}/actions/{action}
const url = 'https://sylve.lan:8181/api/container/1/actions/start';const options = {method: 'POST', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sylve.lan:8181/api/container/1/actions/start \ --header 'Authorization: <Authorization>'Queue a start, stop, restart, or kill action for a container
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ocid
required
integer
Container ID
action
required
string
Lifecycle action
Responses
Section titled “Responses”Accepted
Media typeapplication/json
object
data
object
action
string
ocId
integer
outcome
string
taskId
integer
error
string
message
string
status
string
Examplegenerated
{ "data": { "action": "example", "ocId": 1, "outcome": "example", "taskId": 1 }, "error": "example", "message": "example", "status": "example"}