Get Microservice Container Logs
get
/api/microservice/Workload/readLogs
Gets microservice container logs. For performance reasons, only the last 20 lines of logs are returned.
Request
Query Parameters
-
ContainerPrefix: integer
The container prefix which is used to get container data. If container prefix is 1, source container name is included in the results.Example:
1
-
TimestampPrefix: integer
The time stamp prefix which is used to show time stamps. If time stamp prefix is 1, log timestamp is included in the results.Example:
1
-
container: string
The microservice init-container or the container ID.Example:
-
limit: integer(int32)
The number of records to limit results by. If you do not also set the start parameter, records start at 0.Example:
100
-
path(required): string
The resource path, in /{cluster}/{namespace}/{resource-name} format.Example:
/cluster-1/kube-system/canal
-
start: integer(int32)
The page of results to start from. This parameter is ignored if you do not also set the limit parameter.Default Value:
0
Example:1
-
workloadType(required): string
The type of the workload. Possible values are pod, deployment, service, statefulset, job, replicaset, daemonset, or cronjob.Example:
daemonset
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json
200 Response
Successful operation
Root Schema : schema
Type:
Show Source
object
-
data: array
data
-
message: string
The response message in text.Example:
-
success: boolean
Whether the operation was a success (true) or a failure (false).Example:
true
Nested Schema : microserviceWorkloadReadLogs
Type:
Show Source
object
-
container: string
Container NameExample:
container-node
-
message: string
A message for the log entry generated by the container.Example:
2023-10-20 10:18:23.391 [INFO][52] cni-config-monitor/token_watch.go 225: Update of CNI kubeconfig triggered based on elapsed time.
-
time: string
Time stampExample:
2023-10-20T10:18:23.391270632Z
Default Response
Failed operation
Root Schema : schema
Type:
Show Source
object
-
errors: array
errors
The list of errors reported. Validation errors will be keyed by record field.
-
message: string
The response message.Example:
Exception thrown
-
success: boolean
Whether the operation was a success (true) or a failure (false).Example:
false
Nested Schema : errors
Type:
array
The list of errors reported. Validation errors will be keyed by record field.
Show Source
-
Array of:
object items
An error.
Nested Schema : items
Type:
object
An error.