arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Get cluster namespace Container log

hashtag
Get cluster namespace Container log

get

Get the logs of Containers in the specified cluster and namespace.

Path parameters
clusterIdstringRequired
namespaceNamestringRequired
podNamestringRequired
Query parameters
typestringRequired

Log Retrieval Method(tail or since)

countstringOptional

The number of lines to read when the type is 'tail' (up to 10,000).

sinceSecondsstringOptional

Return logs from before the value in seconds

Responses
chevron-right
200

OK

*/*
get
/v1/clusters/{clusterId}/namespaces/{namespaceName}/pods/{podName}/containers/log
200

OK

[
  {
    "containerName": "api-cmdb",
    "log": "2023-07-03  8:44:55 571828 [Warning] Aborted connection 571828 to db: 'acloud' user: 'root' host: '127.0.0.1' (Got timeout reading communication packets)\n...",
    "podName": "cocktail-api-cmdb-0"
  }
]
GET /v1/clusters/{clusterId}/namespaces/{namespaceName}/pods/{podName}/containers/log?type=text HTTP/1.1
Accept: */*