JSON time key could not be found

I have to collect a date from http in JSON, in this format: “2019-08-17T20:36:42.217Z”

I tried json_time_format = "2006-01-02T15:04:05.000Z" but this didn’t work (error '… JSON time key could not be found).

What should I use?

Did you also provide the JSON key to use with json_time_key?

Yes. It’s working now. I didn’t realize the time key was nested inside a key ‘result’ that holds most of the JSON data. It was necessary to set json_query = "result".

Thanks though and sorry for the false alarm.

Hi, can I ask for help?

I have the same issue like topic starter and everything is workin fine when I use json_query, but I need to colect other filds at the same time, so I try to remove json_query option and try to chenge json_time_key like on example

My data is:

{
  "id": "2wjdsnfononapniYGYUIVTDLPOMPOMNtGE",
  "storageDaily": [
    {
      "atRestTotal": 105020853928250.53,
      "intervalStart": "2020-07-01T00:00:00Z"
    },
    {
      "atRestTotal": 97803640962687.75,
      "intervalStart": "2020-07-02T00:00:00Z"
    },
    {
      "atRestTotal": 82941342808224.38,
      "intervalStart": "2020-07-03T00:00:00Z"
    },
    {
      "atRestTotal": 135553439405527.77,
      "intervalStart": "2020-07-04T00:00:00Z"
    },
    {
      "atRestTotal": 93394478652852.55,
      "intervalStart": "2020-07-05T00:00:00Z"
    },
    {
      "atRestTotal": 115175935259697.42,
      "intervalStart": "2020-07-06T00:00:00Z"
    },
    {
      "atRestTotal": 96535668880984.33,
      "intervalStart": "2020-07-07T00:00:00Z"
    },
    {
      "atRestTotal": 89280809881294.14,
      "intervalStart": "2020-07-08T00:00:00Z"
    },
    {
      "atRestTotal": 122059980269958.28,
      "intervalStart": "2020-07-09T00:00:00Z"
    },
    {
      "atRestTotal": 75410226699755.14,
      "intervalStart": "2020-07-10T00:00:00Z"
    },
    {
      "atRestTotal": 95104395212054.72,
      "intervalStart": "2020-07-11T00:00:00Z"
    },
    {
      "atRestTotal": 60070639592999.3,
      "intervalStart": "2020-07-12T00:00:00Z"
    }
  ],
  "bandwidthDaily": [
    {
      "egress": {
        "repair": 7422539776,
        "audit": 28928,
        "usage": 354816
      },
      "ingress": {
        "repair": 852929536,
        "usage": 359680
      },
      "delete": 0,
      "intervalStart": "2020-07-01T00:00:00Z"
    },
    {
      "egress": {
        "repair": 9654713600,
        "audit": 77056,
        "usage": 0
      },
      "ingress": {
        "repair": 23954176,
        "usage": 0
      },
      "delete": 0,
      "intervalStart": "2020-07-02T00:00:00Z"
    },
    {
      "egress": {
        "repair": 10390602752,
        "audit": 78080,
        "usage": 7372800
      },
      "ingress": {
        "repair": 1740841472,
        "usage": 5478400
      },
      "delete": 0,
      "intervalStart": "2020-07-03T00:00:00Z"
    },
    {
      "egress": {
        "repair": 10921374208,
        "audit": 80384,
        "usage": 4993536
      },
      "ingress": {
        "repair": 2209147136,
        "usage": 7799808
      },
      "delete": 0,
      "intervalStart": "2020-07-04T00:00:00Z"
    },
    {
      "egress": {
        "repair": 10476259328,
        "audit": 66560,
        "usage": 0
      },
      "ingress": {
        "repair": 4638720,
        "usage": 0
      },
      "delete": 0,
      "intervalStart": "2020-07-05T00:00:00Z"
    },
    {
      "egress": {
        "repair": 10697145856,
        "audit": 67328,
        "usage": 0
      },
      "ingress": {
        "repair": 9277440,
        "usage": 512
      },
      "delete": 0,
      "intervalStart": "2020-07-06T00:00:00Z"
    },
    {
      "egress": {
        "repair": 9048644352,
        "audit": 56832,
        "usage": 256
      },
      "ingress": {
        "repair": 92774400,
        "usage": 1024
      },
      "delete": 0,
      "intervalStart": "2020-07-07T00:00:00Z"
    },
    {
      "egress": {
        "repair": 8459767552,
        "audit": 58624,
        "usage": 11443386112
      },
      "ingress": {
        "repair": 1009715712,
        "usage": 7793152
      },
      "delete": 0,
      "intervalStart": "2020-07-08T00:00:00Z"
    },
    {
      "egress": {
        "repair": 7391316736,
        "audit": 45568,
        "usage": 27907864320
      },
      "ingress": {
        "repair": 397639680,
        "usage": 1536
      },
      "delete": 0,
      "intervalStart": "2020-07-09T00:00:00Z"
    },
    {
      "egress": {
        "repair": 7525562880,
        "audit": 52224,
        "usage": 26752089856
      },
      "ingress": {
        "repair": 30324736,
        "usage": 512
      },
      "delete": 0,
      "intervalStart": "2020-07-10T00:00:00Z"
    },
    {
      "egress": {
        "repair": 7841404416,
        "audit": 48384,
        "usage": 26051842816
      },
      "ingress": {
        "repair": 870882304,
        "usage": 6220288
      },
      "delete": 0,
      "intervalStart": "2020-07-11T00:00:00Z"
    },
    {
      "egress": {
        "repair": 4912121600,
        "audit": 38400,
        "usage": 18134281728
      },
      "ingress": {
        "repair": 0,
        "usage": 0
      },
      "delete": 0,
      "intervalStart": "2020-07-12T00:00:00Z"
    }
  ],
  "storageSummary": 1168351411554286.2,
  "bandwidthSummary": 222314117888,
  "egressSummary": 215044337664,
  "ingressSummary": 7269780224,
  "audit": {
    "totalCount": 25299,
    "successCount": 25294,
    "alpha": 19.99999999999995,
    "beta": 0,
    "unknownAlpha": 19.99999999999995,
    "unknownBeta": 3.680563825979579e-307,
    "score": 1,
    "unknownScore": 1
  },
  "uptime": {
    "totalCount": 28971,
    "successCount": 28965,
    "alpha": 0,
    "beta": 0,
    "unknownAlpha": 0,
    "unknownBeta": 0,
    "score": 0,
    "unknownScore": 0
  },
  "priceModel": {
    "EgressBandwidth": 2000,
    "RepairBandwidth": 1000,
    "AuditBandwidth": 1000,
    "DiskSpace": 150
  },
  "nodeJoinedAt": "2020-02-11T16:18:51.907206Z"
}

I need to parse “storageDaily” and “bandwidthDaily” with json_time_key and all other fields, but I stuck with “JSON time key could not be found”

When I set:

json_query = "storageDaily"
json_time_key = "intervalStart"
json_time_format = "2006-01-02T15:04:05Z"

Everything is working fine, but all other fields are dropping.

When I set:

#json_query = "storageDaily"
json_time_key = "storageDaily_intervalStart"
json_time_format = "2006-01-02T15:04:05Z"

I got this error: JSON time key could not be found

Could you please point me in the right direction?