image.update

Description

object image.update(object/array images)

This method allows to update existing images.

This method is only available to Super admin user type. Permissions to call the method can be revoked in user role settings. See User roles for more information.

Parameters

(object/array) Image properties to be updated.

The imageid property must be defined for each image, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.

The method accepts images with the standard image properties.

Return values

(object) Returns an object containing the IDs of the updated images under the imageids property.

Examples

Rename image

Rename image to “Cloud icon”.

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "image.update",
  4. "params": {
  5. "imageid": "2",
  6. "name": "Cloud icon"
  7. },
  8. "id": 1
  9. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "imageids": [
  5. "2"
  6. ]
  7. },
  8. "id": 1
  9. }

Source

CImage::update() in ui/include/classes/api/services/CImage.php.