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
  • 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
  • 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
  • The microservice init-container or the container ID.
    Example:
  • The number of records to limit results by. If you do not also set the start parameter, records start at 0.
    Example:
    100
  • The resource path, in /{cluster}/{namespace}/{resource-name} format.
    Example:
    /cluster-1/kube-system/canal
  • 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
  • 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 Top

Response

Supported Media Types

200 Response

Successful operation
Body ()
Root Schema : schema
Type: object
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : microserviceWorkloadReadLogs
Type: object
Show Source
  • Container Name
    Example: container-node
  • 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 stamp
    Example: 2023-10-20T10:18:23.391270632Z

Default Response

Failed operation
Body ()
Root Schema : schema
Type: object
Show Source
Nested Schema : errors
Type: array
The list of errors reported. Validation errors will be keyed by record field.
Show Source
Nested Schema : items
Type: object
An error.
Back to Top