inteiro/array valuemap.get(parâmetros do objeto)
O método permite recuperar mapas de valor de acordo com os parâmetros fornecidos.
Este método está disponível para usuários de qualquer tipo. Permissões para chamar o método pode ser revogado nas configurações de função do usuário. Veja Funções de usuário para maiores informações.
(object)
Parameters defining the desired output.
The method supports the following parameters.
Parameter | Type | Description |
---|---|---|
valuemapids | string/array | Return only value maps with the given IDs. |
selectMappings | query | Return the value mappings for current value map in the mappings property. Supports count . |
sortfield | string/array | Sort the result by the given properties. Possible values are: valuemapid , name . |
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 |
(integer/array)
Returns either:
countOutput
parameter has been used.Retrieve all configured value maps.
Request:
{
"jsonrpc": "2.0",
"method": "valuemap.get",
"params": {
"output": "extend"
},
"auth": "57562fd409b3b3b9a4d916d45207bbcb",
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": [
{
"valuemapid": "4",
"name": "APC Battery Replacement Status"
},
{
"valuemapid": "5",
"name": "APC Battery Status"
},
{
"valuemapid": "7",
"name": "Dell Open Manage System Status"
}
],
"id": 1
}
Retrieve one value map with its mappings.
Request:
{
"jsonrpc": "2.0",
"method": "valuemap.get",
"params": {
"output": "extend",
"selectMappings": "extend",
"valuemapids": ["4"]
},
"auth": "57562fd409b3b3b9a4d916d45207bbcb",
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": [
{
"valuemapid": "4",
"name": "APC Battery Replacement Status",
"mappings": [
{
"type": "0",
"value": "1",
"newvalue": "unknown"
},
{
"type": "0",
"value": "2",
"newvalue": "notInstalled"
},
{
"type": "0",
"value": "3",
"newvalue": "ok"
},
{
"type": "0",
"value": "4",
"newvalue": "failed"
},
{
"type": "0",
"value": "5",
"newvalue": "highTemperature"
},
{
"type": "0",
"value": "6",
"newvalue": "replaceImmediately"
},
{
"type": "0",
"value": "7",
"newvalue": "lowCapacity"
}
]
}
],
"id": 1
}
CValueMap::get() in ui/include/classes/api/services/CValueMap.php.