update_image

To set or change a unit icon, execute the unit/update_image method.

To copy an icon from another unit, use the following signature:

Copied!
svc=unit/update_image&params={
    "itemId": <long>,
    "oldItemId": <long>
}

To use an icon from the library, use the following signature:

Copied!
svc=unit/update_image&params={
    "itemId": <long>,
    "libId": <long>,
    "path": <text>
}

Parameters

The request must contain the following parameters:

Parameter Description
itemId ID of the unit to which you want to apply the icon.
olditemId ID of the unit from which you want to copy the icon.
libId ID of the resource in which the necessary image is stored. To use the default library, pass 0.
path Path to the image file.

Response

If the request is completed successfully, an empty object is returned:

Copied!
{}

Otherwise, an error code is returned.

Error codes

Error code Description
4 Wrong input parameters.
6 Failed to set or change the unit icon.
7 No ADF_ACL_ITEM_EDIT_IMAGE access right to the unit.

If you find a mistake in the text, please select it and press Ctrl+Enter.

Report a mistake

Your message was sent. Thank you!

An error occurred while submitting the form

Download PDF file
Download Word document

See also