Get Log Server Configuration

GET/zstack/v1/log/configurations

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" -X GET http://localhost:8080/zstack/v1/log/configurations

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
systemTags (optional)Listquery  3.10.0
userTags (optional)Listquery  3.10.0

API Response

Response Example

{
  "inventories": [
    {
      "id": 0.0,
      "labelKey": "log4j2-0201c1784c6e48d2ba26954d4c688fae",
      "labelValue": "{\n\"appenderType\": \"Syslog\",\n\"configuration\": {\n\"hostname\": \"192.168.0.13\",\n\"port\": \"514\",\n\"protocol\": \"UDP\",\n\"facility\": \"LOCAL5\"\n}\n}"
    },
    {
      "id": 0.0,
      "labelKey": "log4j2-ba2cf0a6945d4267bfdc1994776b509d",
      "labelValue": "{\n\"appenderType\": \"Syslog\",\n\"configuration\": {\n\"hostname\": \"192.168.0.11\",\n\"port\": \"514\",\n\"protocol\": \"UDP\",\n\"facility\": \"LOCAL5\"\n}\n}"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. See error3.10.0
inventoriesListSee inventories3.10.0

error

NameTypeDescriptionStarting Version
codeStringError code number. A globally unique identifier for the error, e.g., SYS.1000, HOST.10013.10.0
descriptionStringBrief description of the error3.10.0
detailsStringDetailed error information3.10.0
elaborationStringReserved field. Defaults to null3.10.0
opaqueLinkedHashMapReserved field. Defaults to null3.10.0
causeErrorCodeRoot error. The source error that caused this error. Null if no root cause exists3.10.0

inventories

NameTypeDescriptionStarting Version
idlong 3.10.0
labelKeyString 3.10.0
labelValueString 3.10.0
resourceUuidStringResource UUID3.10.0
createDateTimestampCreation time3.10.0
lastOpDateTimestampLast modification time3.10.0

SDK Examples

Java SDK

GetLogConfigurationAction action = new GetLogConfigurationAction();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetLogConfigurationAction.Result res = action.call();

Python SDK

GetLogConfigurationAction action = GetLogConfigurationAction()
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetLogConfigurationAction.Result res = action.call()