Meraki Sensor API - fetching latest sensor reading by serial

Solved
Rebry
Here to help

Meraki Sensor API - fetching latest sensor reading by serial

Hi

For some reason ive figured i'd make an Apple homekit plugin for homebridge featuring the Meraki MT sensors. 

I guess ive got to much time on my hand. 

 

But! 

Im unable to fetch the latest information based on serials. 

 

the API keeps returning (in postman) :

 

{
    "errors": [
        "'serials' must be an array"
    ]
}
 
Could someone point me in the direction of the correct formatting for the so-called array i need to send? 
1 Accepted Solution
RaphaelL
Kind of a big deal
Kind of a big deal

Hi , could you provide us which endpoint are you using ?

 

I'm guessing the syntax should be something like that : serials[]="xxxx-xxxx-xxxx"

View solution in original post

5 Replies 5
RaphaelL
Kind of a big deal
Kind of a big deal

Hi , could you provide us which endpoint are you using ?

 

I'm guessing the syntax should be something like that : serials[]="xxxx-xxxx-xxxx"

Rebry
Here to help

Yep! thats it @RaphaelL 


Ive tried the serials=[] as postman had that as an example in the postman themplate. 

And no matter how i formatted the array on the right side, it complained. 

 

first try with https://api.meraki.com/api/v1/organizations/ORGID/sensor/readings/latest?serials[]=SERIAL and it worked 😄 

Thanks! 

RaphaelL
Kind of a big deal
Kind of a big deal

Excellent ! Glad you got it working !

David_Jirku
Meraki Employee
Meraki Employee

Hi! Any idea how to format this query in postman itself?

Ryan_Miles
Meraki Employee
Meraki Employee

Screenshot 2023-09-04 at 18.25.17.png

Ryan

If you found this post helpful, please give it Kudos. If my answer solves your problem please click Accept as Solution so others can benefit from it.
Get notified when there are additional replies to this discussion.