Get Elaborations

GET/zstack/v1/errorcode/elaborations

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/errorcode/elaborations?category=BS&regex=certificate has expired or is not yet valid

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
category (Optional)StringqueryThe category of the error code, pointing to a resource or service category, such as HOST 3.3.0
regex (Optional)StringqueryError code keyword 3.3.0
code (Optional)StringqueryError code, used together with category 3.6.0
systemTags (Optional)ListquerySystem tags 3.3.0
userTags (Optional)ListqueryUser tags 3.3.0

API Response

Response example

{
  "contents": [
    {
      "category": "HOST",
      "code": "1003",
      "regex": "host[uuid:%s, name:%s] is in status[%s], cannot perform required operation",
      "message_cn": "主机正处于[停止]状态,不能进行该操作",
      "message_en": "Host is in status[Stopped], cannot perform required operation",
      "source": "zstack",
      "method": "regex",
      "distance": 0.0
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error3.3.0
contentsListFor details, see contents3.3.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, such as SYS.1000, HOST.1001.0.6
descriptionStringA brief description of the error0.6
detailsStringThe detailed error information0.6
elaborationStringA reserved field. Default is null.0.6
opaqueLinkedHashMapA reserved field. Default is null.0.6
causeErrorCodeThe root error. The source error that caused the current error. This field is null if there is no root error.0.6

contents

NameTypeDescriptionStarting Version
categoryStringThe category to which the error code belongs3.3.0
codeStringThe error code identifier3.3.0
regexStringThe error code matching keyword3.3.0
message_cnStringThe error code message in Chinese3.3.0
message_enStringThe error code message in English3.3.0
sourceStringThe error source3.3.0
methodStringThe matching method: distance (string comparison) or regex (regular expression)3.6.0
distanceDoubleIf the distance matching method is used, this is the accuracy (1 is the most accurate)3.6.0

SDK Examples

Java SDK

GetElaborationsAction action = new GetElaborationsAction();
action.category = "BS";
action.regex = "certificate has expired or is not yet valid";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetElaborationsAction.Result res = action.call();

Python SDK

GetElaborationsAction action = GetElaborationsAction()
action.category = "BS"
action.regex = "certificate has expired or is not yet valid"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetElaborationsAction.Result res = action.call()