Zabbix Documentation 1.8

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


api:user:deletemedia

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

api:user:deletemedia [2014/09/25 14:40] (current)
sasha Page moved from 1.8:api:user:deletemedia to api:user:deletemedia
Line 1: Line 1:
 +===== deleteMedia() =====
 +Available since version: **1.8**\\
  
 +==== Parameters ====
 +Array with media data, media **ID** must be specified.\\
 +
 +^Parameter^Type^Optional^Description^Details^
 +|**medias**|//​array//​| Yes |Media objects which should be deleted (removed / added). ​ | |
 +
 +==== Returns =====
 +^Parameter^Description^
 +|**result**|Operation successful. Result will contain an array of deleted user media IDs.|
 +|**error**|In case of any errors|
 +
 +==== Example ====
 +Remove two user media from user with **ID** "​100100000010092"​
 +<​code>​
 +{
 +"​jsonrpc":"​2.0",​
 +"​method":"​user.deleteMedia",​
 +"​params":​[
 +  {"​mediaid":​ "​100100000000011"​},​
 +  {"​mediaid":​ "​100100000000012"​}
 +],
 +"​auth":"​f223adf833b2bf2ff38574a67bba6372",​
 +"​id":​2
 +}
 +</​code>​
 +
 +User media deleted successfully:​
 +
 +<​code>​
 +{
 +"​jsonrpc":"​2.0",​
 +"​result":​{
 +   "​mediaids":​["​100100000000011",​ "​100100000000012"​]
 +},
 +"​id":​2
 +}
 +</​code>​