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 !

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

Screenshot 2023-09-04 at 18.25.17.png

Get notified when there are additional replies to this discussion.