ZABBIX Forums  
Old 07-02-2012, 23:53
akushner akushner is offline
Junior Member
Join Date: Feb 2012
Posts: 4
Default JSON API output filter

From zabbix API documentation:

Get methods output parameter

Output can be “shorten”, “refer”, “extend” and array of db field names.

-shorten: only ids of elements are returned. (for hosts it's hostid, for items itemid etc)
-refer: element ids are returned with element ids that were used in query.
For example request item.get(output: refer, hostids: [1,2,3])) will return items with itemids and hostids.
-extend: all db fields of element are returned (select *)
-array of db fields: listed db fields are returned

What is the correct format to pass an array of db fields? I have tried the following:

but this only returns the itemids

or is there a different way to filter the returned fields?

Last edited by akushner; 08-02-2012 at 00:03.
Reply With Quote
Old 17-02-2012, 13:09
akushner akushner is offline
Junior Member
Join Date: Feb 2012
Posts: 4
Default Not supported for items

After doing a little more digging, I found an update that states the following


“output”:“extend” means that you want to get all available info about each group. This, in a way, is similar to “SELECT *” in SQL. Possible options of “output” are:

“extend” - get all info;
“shorten” - get only ids of an object;
“refer” - get id of an object and also ids of related objects;
list of fields, like [“groupid”, “name”] - get only listed fields.

List of fields is only supported in Alert, DCheck, Host, DService, Screenitem, Template and Trigger get methods.
Reply With Quote

api, filter, output

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 16:35.