On this page
image.getobjects
Description
array image.getobjects(object filter)
This method allows to retrieve images that match the given filter criteria.
Parameters
(object) Criteria to search by.
Additionally to the standard standard image properties the following parameters are supported as search criteria.
| Parameter | Type | Description |
|---|---|---|
| node | string | Name of the node the images must belong to. This will override the nodeids parameter. |
| nodeids | string/array | IDs of the nodes the images must belong to. |
Return values
(array) Returns an array of objects with all properties.
Examples
Retrieve image by name
Retrieve image called "Cloud_(24)".
Request:
{
"jsonrpc": "2.0",
"method": "image.getobjects",
"params": {
"name": "Cloud_(24)"
},
"auth": "3a57200802b24cda67c4e4010b50c065",
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": [
{
"imageid": "2",
"imagetype": "1",
"name": "Cloud_(24)"
}
],
"id": 1
}
See also
Source
CImage::getObject() in frontends/php/api/classes/CImage.php.