This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:sidebar:remoteapi:apiref:resource:upload_zone_image [25/02/2016 17:08] stan [Geofences: upload/delete image] |
en:sidebar:remoteapi:apiref:resource:upload_zone_image [09/04/2019 12:02] chdi [Parameters] |
||
---|---|---|---|
Line 2: | Line 2: | ||
====== Geofences: Image ====== | ====== Geofences: Image ====== | ||
- | To upload an image for a Geofence, use the command **resource/upload_zone_image**: | + | To upload an image for a Geofence or set an image of other Geofence, use the command **resource/upload_zone_image**: |
<code javascript> | <code javascript> | ||
svc=resource/upload_zone_image¶ms={"itemId":<long>, | svc=resource/upload_zone_image¶ms={"itemId":<long>, | ||
"id":<long>, | "id":<long>, | ||
- | "eventHash":<text>} | + | "eventHash":<text>, |
+ | "oldItemId":<long>, | ||
+ | "oldZoneId":<uint>} | ||
</code> | </code> | ||
- | :!: To delete an image, use the command [[update_zone]]. | + | :!: To delete an image, use the command [[update_zone]].\\ |
- | :!: To get an image, use [[../requests/avl_zone_image]] | + | :!: To get an image, use [[../requests/avl_zone_image]]. |
===== Parameters ===== | ===== Parameters ===== | ||
^ Name ^ Description ^ | ^ Name ^ Description ^ | ||
| itemId | resource ID | | | itemId | resource ID | | ||
| id | geofence ID | | | id | geofence ID | | ||
- | | eventHash | event name, which will be generated after uploading the image (optional parameter) | | + | | eventHash | event name, which will be generated after uploading the image| |
+ | | oldItemId | resource id of other Geofence to set its image (optional parameter)| | ||
+ | | oldZoneId | other Geofence id of to set its image (optional parameter)| | ||
To upload an image, use a POST request with multiple contents (multipart/form-data), where one part contains parameters and the other contains the image. | To upload an image, use a POST request with multiple contents (multipart/form-data), where one part contains parameters and the other contains the image. |
|