Skip to main content
Settings/Log Server Operations
POSTLog Server OperationsSince 5.3.28SynchronousAuth Required

AddLogServer

AddLogServer

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • nameStringRequired

    The resource name.

  • descriptionString

    Optional. The resource description.

  • categoryStringRequired

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

  • typeStringRequired

    The log type.

  • levelString

    Optional. The log severity level.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • errorErrorCodeRequired

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

    • codeStringRequired

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

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

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

  • inventoryLogServerInventoryRequired

    See inventory

    • uuidStringRequired

      The resource UUID.

    • nameStringRequired

      The resource name.

    • descriptionStringRequired

      The resource description.

    • configurationStringRequired

      配置。

    • createDateTimestampRequired

      The creation time.

    • lastOpDateTimestampRequired

      The last operation time.

    • categoryLogCategoryRequired

      See category

      • ManagementNodeLogLogCategoryRequired

        管理节点日志。

      • PlatformOperationLogLogCategoryRequired

        平台操作日志。

      • SnatLogLogCategoryRequired

        No description provided.

    • typeLogTypeRequired

      See type

      • Log4j2LogTypeRequired

        No description provided.

      • FluentBitLogTypeRequired

        No description provided.

    • levelLogLevelRequired

      See level

      • OFFLogLevelRequired

        No description provided.

      • FATALLogLevelRequired

        No description provided.

      • ERRORLogLevelRequired

        错误。

      • WARNLogLevelRequired

        告警。

      • INFOLogLevelRequired

        No description provided.

      • DEBUGLogLevelRequired

        No description provided.

      • TRACELogLevelRequired

        No description provided.

      • ALLLogLevelRequired

        全部。

Endpoint

POST/zstack/v1/log/servers

/zstack/v1/log/servers

Operation ID

AddLogServer

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/log/servers' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"name":"<name>","description":"<description>","category":"<category>","type":"<type>","level":"<level>","configuration":"<configuration>","resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"],"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": {} }

Change History

This API has no change history records yet.

View all change history