-1

I need to know, how to get the first clock of an item using the API 3.0?

i.e.: the first clock when created or when start to get the incoming/outgoing the traffic.

Randi Ortiz
  • 75
  • 1
  • 5

1 Answers1

0

The following should get you the oldest value for an item. Make sure to use the correct history type, item ID and auth token.

There is no reliable way to find item creation time.

{
    "jsonrpc": "2.0",
    "method": "history.get",
    "params": {
        "history": 0,
        "itemids": "12345",
        "sortfield": "clock",
        "sortorder": "ASC",
        "limit": 1
    },
    "auth": "auth_token",
    "id": 1
}
Richlv
  • 3,954
  • 1
  • 17
  • 21
  • I found the solution. Yes, I did it as you say Richlv, the problem was that Zabbix only gave me back the 7-day clock of historical data, but I realized that in the application they had it set to only 7 days of historical data ... now I only have wait for that configuration to change Thank you for your great help in my first two publications BTW, I do not understand the negative feedback to my comment... – Randi Ortiz Mar 14 '20 at 21:29