Get container logs
GET
/container/{ocid}/logs
const url = 'https://sylve.lan:8181/api/container/1/logs?tail=500';const options = {method: 'GET', 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 GET \ --url 'https://sylve.lan:8181/api/container/1/logs?tail=500' \ --header 'Authorization: <Authorization>'Get the last lines of a container’s output
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ocid
required
integer
Container ID
Query Parameters
Section titled “Query Parameters”tail
integer
Number of lines
Responses
Section titled “Responses”Success
Media typeapplication/json
object
data
string
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}