integer/array sla.get(§á§Ñ§â§Ñ§Þ§Ö§ä§â§í §à§Ò§ì§Ö§Ü§ä§Ñ)
§®§Ö§ä§à§Õ §á§à§Ù§Ó§à§Ý§ñ§Ö§ä §á§à§Ý§å§é§Ñ§ä§î §à§Ò§ì§Ö§Ü§ä§í SLA §á§à §Ù§Ñ§Õ§Ñ§ß§ß§í§Þ §á§Ñ§â§Ñ§Þ§Ö§ä§â§Ñ§Þ.
§¿§ä§à§ä §Þ§Ö§ä§à§Õ §Õ§à§ã§ä§å§á§Ö§ß §á§à§Ý§î§Ù§à§Ó§Ñ§ä§Ö§Ý§ñ§Þ §Ý§ð§Ò§à§Ô§à §ä§Ú§á§Ñ. §²§Ñ§Ù§â§Ö§ê§Ö§ß§Ú§ñ §ß§Ñ §Ó§í§Ù§à§Ó §Þ§Ö§ä§à§Õ§Ñ §Þ§à§Ø§ß§à §à§ä§à§Ù§Ó§Ñ§ä§î §Ó §ß§Ñ§ã§ä§â§à§Û§Ü§Ñ§ç §â§à§Ý§Ö§Û §á§à§Ý§î§Ù§à§Ó§Ñ§ä§Ö§Ý§ñ. §¥§à§á§à§Ý§ß§Ú§ä§Ö§Ý§î§ß§å§ð §Ú§ß§æ§à§â§Þ§Ñ§è§Ú§ð §ã§Þ. §Ó §â§Ñ§Ù§Õ§Ö§Ý§Ö §²§à§Ý§Ú §á§à§Ý§î§Ù§à§Ó§Ñ§ä§Ö§Ý§Ö§Û.
(object)
Parameters defining the desired output.
The method supports the following parameters.
Parameter | Type | Description |
---|---|---|
slaids | string/array | Return only SLAs with the given IDs. |
serviceids | string/array | Return only SLAs matching the specific services. |
selectSchedule | query | Return a schedule property with SLA schedules.Supports count . |
selectExcludedDowntimes | query | Return an excluded_downtimes property with SLA excluded downtimes.Supports count . |
selectServiceTags | query | Return a service_tags property with SLA service tags.Supports count . |
sortfield | string/array | Sort the result by the given properties. Possible values are: slaid , name , period , slo , effective_date , timezone , status and description . |
countOutput | boolean | These parameters being common for all get methods are described in detail in the reference commentary. |
editable | boolean | |
excludeSearch | boolean | |
filter | object | |
limit | integer | |
output | query | |
preservekeys | boolean | |
search | object | |
searchByAny | boolean | |
searchWildcardsEnabled | boolean | |
sortorder | string/array | |
startSearch | boolean |
(§è§Ö§Ý§à§Ö §é§Ú§ã§Ý§à/§Þ§Ñ§ã§ã§Ú§Ó)
§£§à§Ù§Ó§â§Ñ§ë§Ñ§Ö§ä §Ý§Ú§Ò§à:
countOutput
.Retrieve all data about all SLAs and their properties.
Request:
{
"jsonrpc": "2.0",
"method": "sla.get",
"params": {
"output": "extend",
"selectSchedule": ["period_from", "period_to"],
"selectExcludedDowntimes": ["name", "period_from", "period_to"],
"selectServiceTags": ["tag", "operator", "value"],
"preservekeys": true
},
"auth": "85dd04b94cbfad794616eb923be13c71",
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": {
"1": {
"slaid": "1",
"name": "Database Uptime",
"period": "1",
"slo": "99.9995",
"effective_date": "1672444800",
"timezone": "America/Toronto",
"status": "1",
"description": "Provide excellent uptime for main SQL database engines.",
"service_tags": [
{
"tag": "Database",
"operator": "0",
"value": "MySQL"
},
{
"tag": "Database",
"operator": "0",
"value": "PostgreSQL"
}
],
"schedule": [
{
"period_from": "0",
"period_to": "601200"
}
],
"excluded_downtimes": [
{
"name": "Software version upgrade rollout",
"period_from": "1648760400",
"period_to": "1648764900"
}
]
}
},
"id": 1
}
CSla:get() §Ó ui/include/classes/api/services/CSla.php.