Ok, so I am pulling my hair out on this one and I really hope someone out there can tell me what I am doing wrong. I am also very green to coding, so please be kind!
I am trying to parse the data with
"responseTemplate": "{{#results.0}}{{#printer_status}}{{#current_print_run}}{{status}}~{{currently_printing_layer}}~{{layer_count}}~{{/current_print_run}}{{/printer_status}}{{/results.0}}"
The above was the example I was given to try, but I think the problem is that the API that I am calling used to display the data in dictionary format and now they switched to an array of data.
If I take out the responseTemplate in my webhook, I do get all of the data, so at least I know the data is coming back from the API correctly.
I believe this is just a formatting error in my response, but I am not sure. Here is the raw data if I use curl.
[{"serial":"AlphaGo","machine_type_id":"FORM-2-0","factory_mac":"88:88:88:88:88:88","total_print_time_ms":1255483629,"total_number_of_prints":35,"created_at":"2015-09-28T16:57:23.230465Z","url":"http://api.formlabs.com/printernet/v1/printers/AlphaGo/","last_print_at":"2016-10-15T09:54:30.159288Z","resin_usage":[],"printer_status":{"id":11395,"current_print_run":null,"status":"IDLE","last_modified":"2017-03-05T21:29:33.317524Z","current_temperature":null,"printer":"AlphaGo"},"display_name":"","location":"","cartridge_status":{"cartridge":{"serial":"2d-0000119ccd1b","machine_type_id":"FORM-2-0","material":"FLDUCL01","initial_volume_ml":0.0,"volume_dispensed_ml":582.771750813247,"dispense_count":68,"mechanical_version":"3","manufacture_date":"2017-02-02T23:51:53Z","manufacturer":"BE","lot_number":"20170127","last_modified":"2017-02-21T23:16:02.734213Z","is_empty":false,"inside_printer":"AlphaGo"},"last_modified":"2017-03-05T21:21:32.662000Z"},"tank_status":{"tank":{"serial":"992999922","material":"FLDUCL01","layers_printed":10387,"print_time_ms":280772109,"heatmap":"https://formlabs-api-tank-heatmaps.s3.amazonaws.com/tank_heatmap_images/7373.png","heatmap_gif":"https://formlabs-api-tank-heatmaps.s3.amazonaws.com/tank_heatmap_images/7474.gif","mechanical_version":"18","manufacture_date":"2016-11-03T16:46:59Z","manufacturer":"ET","lot_number":"0008712389","last_modified":"2017-02-21T23:15:02.947372Z","inside_printer":"AlphaGo"},"last_modified":"2017-03-05T21:21:32.673810Z"},"cylinder_status":null}]
Any ideas? Thank you so much!
-Bobby