Skip to main content
Settings/Log Server Operations

AddLogServer

AddLogServer

POST/zstack/v1/log/servers

Operation ID

AddLogServer

Since

5.3.28

Execution Mode

Synchronous

Auth Context

Auth Required

Auth Context

Send these values as request headers when calling this API.

AuthorizationstringRequired

Bearer Token

X-Tenant-IDstring

X-Tenant-ID

Request Inputs

application/json

Body Fields

  • name
    StringRequired

    The resource name.

  • description
    String

    Optional. The resource description.

  • category
    StringRequired

    The log category.Note: When category is SnatLog, type must be FluentBit, and the output type in configuration must be Syslog.

  • type
    StringRequired

    The log type.

  • level
    String

    Optional. The log severity level.

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • success
    booleanRequired

    Whether the operation succeeded.

  • error
    ErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error

    • code
      StringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • description
      StringRequired

      The brief description of the error.

    • details
      StringRequired

      The details about the error.

    • elaboration
      StringRequired

      The reserved field. Default value: null.

    • opaque
      LinkedHashMapRequired

      The reserved field. Default value: null.

    • cause
      ErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventory
    LogServerInventoryRequired

    See inventory

    • uuid
      StringRequired

      The resource UUID.

    • name
      StringRequired

      The resource name.

    • description
      StringRequired

      The resource description.

    • configuration
      StringRequired

      The configuration.

    • createDate
      TimestampRequired

      The creation time.

    • lastOpDate
      TimestampRequired

      The last operation time.

    • category
      LogCategoryRequired

      See category

      • ManagementNodeLog
        LogCategoryRequired

        The ManagementNodeLog value.

      • PlatformOperationLog
        LogCategoryRequired

        The PlatformOperationLog value.

      • SnatLog
        LogCategoryRequired

        The SnatLog value.

    • type
      LogTypeRequired

      See type

      • Log4j2
        LogTypeRequired

        The Log4j2 value.

      • FluentBit
        LogTypeRequired

        The FluentBit value.

    • level
      LogLevelRequired

      See level

      • OFF
        LogLevelRequired

        The OFF value.

      • FATAL
        LogLevelRequired

        The FATAL value.

      • ERROR
        LogLevelRequired

        The ERROR value.

      • WARN
        LogLevelRequired

        The WARN value.

      • INFO
        LogLevelRequired

        The INFO value.

      • DEBUG
        LogLevelRequired

        The DEBUG value.

      • TRACE
        LogLevelRequired

        The TRACE value.

      • ALL
        LogLevelRequired

        The ALL value.