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


Sidebar

api:mediatype:delete

Table of Contents

delete()

Available since version: 1.8
This function allows you to delete information about one or several mediatypes. All mediatype-related information will be removed including triggers, empty graphs, child mediatypes, historical data.

Parameters

Array of Mediatype IDs

Returns

Parameter Description
resultOperation successful. Result will contain array of deleted Mediatype IDs.
error In case of any errors

Example

Delete mediatypes by mediatype ID

{
"jsonrpc": "2.0",
"method": "mediatype.delete",
"params": ["107824", "107825"],
"auth": "3a57200802b24cda67c4e4010b50c065",
"id": 2
}

Mediatypes deleted successfully:

{
"jsonrpc": "2.0",
"result": {
   "mediatypeids": ["107824", "107825"]
},
"id": 2
}

Mediatypes do not exist:

{
"jsonrpc": "2.0",
"error": {
      "code": -32500,
      "message": "Application error.",
      "data": "[ CMediatype::delete ] Mediatype does not exist"
},
"id": 2
}