Sidebar

api:usermacro:deleteglobal

deleteGlobal()

Available since version: 1.8
This function allows you to delete information about one or several globalmacros. All globalmacro-related information will be removed including items, graphs, macros, application, historical data, etc.

Parameters

Array of Globalmacro macros

Returns

ParameterDescription
resultOperation successful. Result will contain array of deleted Globalmacro IDs.
errorIn case of any errors

Example

Delete globalmacros by macro

{
"jsonrpc": "2.0",
"method": "usermacro.deleteGlobal",
"params": [
    "{$MACRO3}",
    "{$MACRO4}"
],
"auth": "3a57200802b24cda67c4e4010b50c065",
"id": 2
}

Globalmacros deleted successfully:

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

Globalmacro does not exist:

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