Hi @RahulChaubey, Good Day!
We would like to inform you that at this moment, Databricks doesn't support any API to get the numbers or details of notebooks attached to the All-Purpose cluster. You can continue with the approach you are following now to check the number of notebooks.
And for the more details on the Databricks API, you can keep this document handy for the reference : https://docs.databricks.com/api/workspace/introduction
Also, we do have an internal feature request to address this issue our Product Team prioritizes development based on factors such as the number of upvotes the request receives and the number of customers requesting it.
Please let me know if this helps and leave a like if this information is useful, followups are appreciated.
Kudos
Ayushi