Within Zoom Phone API (documented here > https://marketplace.zoom.us/docs/api-reference/zoom-api/phone/listaccountphonenumbers ) able to query available numbers per site.
Hey @snimmo, thanks for posting and using Zoom!
Have you used the type=unassigned
query param? That will include numbers that have not been assigned (in other words, available) to your account.
Thanks,
Tommy
@tommy, thanks for the answer there however I think I need to clarify my ask now;
So Iām running the following;
Invoke-RestMethod āhttps://api.zoom.us/v2/phone/numbers?page_size=300ā -Headers @{āAuthorizationā = āBearer $Accesstokenā} -Method Get -ContentType āapplication/jsonā
Within the response Iām getting back (note the page_size);
Also, is there a way (or to be added) to query by site so that the page return is smaller depending on the site size?
Hey @snimmo,
I was able to reproduce the page_size max being 100 and not 300. We are looking into this.
Can you explain further, I donāt understand?
When you say āsiteā do you mean Zoom account?
Thanks,
Tommy
Within Zoom phone UI, you have āSiteā listed (in a follow up post since it doesnāt like multiple images in a post);
Now, those sites translate out to a GUID (using my account as the example);
Since we have multiple āsitesā (as in physical offices), itāll help to know how many numbers are left under that particular site and would reduce the size of the call since weāre not looking for allll numbers in the account, just only at a site.
Hey @snimmo, the max page_size is 100, we have updated our documentation.
As for the site, thank you for the clarification
Adding a site query param would be a great enhancement to the GET /phone/numbers endpoint. I will add this as a feature request.
Not sure if this helps, but we have a GET /phone/sites/{siteId} endpoint.
You can track our releases here to see when the site query param gets released.
Thanks,
Tommy
@tommy, thanks for updating the docs.
About the site query, we do get the name of the site (kudos) and it matches what we would see from the phone management GUI (also hurray). But the only number listed is the auto-receptionist (which is nice, but not sure if useful right now at least).
So to query available numbers by their site_id value would be amazing to have. Also for the calling plans to site assignment, looking over the docs Iām not entirely sure how to validate E911 settings either and/or there isnāt anything in the user profile that states that (maybe defined somewhere within the site?). Iāll admit I havenāt dug much into it but figured it wouldnāt hurt to ask.
Happy to help @snimmo, thanks for pointing this out to us!
As for the Zoom Phone E911 settings, can you elaborate on this?
Do you mean the emergency address settings?
Thanks,
Tommy
Hey @snimmo,
Have you seen our āSetting Up Emergency Addresses and Emergency Callingā page?
Let me know if this helps!
Thanks,
Tommy
@tommy, that looks good. I think Iām over thinking it just a bit.
In the meantime, Iāll keep an eye on the site query param release but continue to see if I can make things work as they stand currently.
Also, on the GET /phone/numbers endpoint, I donāt see where the next_page_token is supplied after running this (or if supplied before, where does one get it?);
Invoke-RestMethod āhttps://api.zoom.us/v2/phone/numbers?page_size=100ā -Headers @{āAuthorizationā = āBearer $Accesstokenā} -Method Get -ContentType āapplication/jsonā
Hey @snimmo,
Can you try supplying the following query param for pagination?
page_number=2
I think our docs might be wrong.
https://api.zoom.us/v2/phone/numbers?page_size=100&page_number=2
Thanks,
Tommy
It just displays the second page of results meaning Iād have to get the number of pages and then loop through them.
So, in my case, Iād have to run my query 30 times (one to get the number of pages, then loop another 29)
Hey @snimmo,
The page_count
tells you how many pages of page_size
(100) there are.
So yes to get all of the data, you would have to make 29 requests.
Thanks,
Tommy
Thatās a bit depressing but I guess it is what it is currently.
In that event, Iāll keep an eye on the releases for said API and any/all recaps from our Account Rep.
So, for the time being, I think weāre good to go in regards to get started on testing.
Hey @snimmo!
Yes stay up to date on the releases
Let us know if you have other questions while testing!
Thanks,
Tommy
Hey @snimmo,
We are updating the GET /phone/numbers endpoint and GET /phone/sites/{siteId} endpoint to fix a bug. They will be re-released in November/December. In the meantime please use the phone APIs that you see listed in our docs.
Thanks, and sorry for the inconvenience.