Agent Count per Org in API
complete
R
Ryan O'Dwyer
In the absence of of a accounting connection or something similar, is it possible to gather the agent counts using the organisations endpoint in the API?
Currently the only way it seems possible is to paginate through all the agents in an org from the agents endpoint and calculate the count myself. That is straight forward in a script, but not so easy with something like n8n
D
Daphine Runolfsson
When should one pull the https://api.huntress.io/v1/organizations?page=1&limit=10 type of report to ensure the agent_counts will add up to the total count in the invoice the MSP receives?
S
Salley'la Auer'la
complete
S
Salley'la Auer'la
Hi Ryan,
I can help here. When a request is made to the organizations endpoint, for example,
https://api.huntress.io/v1/organizations?page=1&limit=10
, there is a per-organization key called "agents_count", which has the integer for that account 🎉For some reason, it isn't documented on our /docs page, but it is present; I attached a screenshot of my swagger to show you.
R
Ryan O'Dwyer
Salley'la Auer'la: ah, thanks yep, I was relying on the API docs and hadn't invested time just yet into connecting to the API. I will give that a go as that will now work, thanks. Can this request be closed now?
S
Salley'la Auer'la
Ryan O'Dwyer: You got it :-)