AutomoxAutomox

Empty Response in API of devices

broken_stranger_n
June 25, 2022 at 10:40 am UTC
#automox#api#worklet tournament#device#empty_response

While I am trying to fetch all associative devices of my console via api I am getting [ ] empty array in response.. 

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (4)

dan_btgJune 27, 2022
#1

Hi,

Could you share the API call?

broken_stranger_nJune 28, 2022
#2

/servers?patchStatus=missing&limit=500&o=0000&pending=1&page=10&filters[is_compatible]=1&sortDir=desc

dan_btgJune 28, 2022
#3

You have a lot of filters there. Perhaps start with just the org level call and work from there?

https://console.automox.com/api/servers?o=<YOUR_ORG_ID>

BenG-AutomoxJune 29, 2022
#4

@broken_stranger_n 

The query parameters look accurate in your API call. I would certainly simplify the API call initially as you build out any automation you are putting together to make sure there are results as previously mentioned. I do not have the complete context to what you are putting together, but you may also want to review:

  • Confirm that you have the correct org_id in the o query parameter
  • Validate the HTTP Status Code you receive after making the request
  • Confirm you are making a GET HTTP request to the servers resource
  • Confirm you are providing the right authentication token

What language or tool are you using to make the request? You can also review some examples depending on what you are using to get the expected response.

 

Hope this help!

 

Ben