Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback Requested: ZPA v2 Endpoints + API Update #56

Closed
mitchos opened this issue Oct 22, 2021 · 2 comments
Closed

Feedback Requested: ZPA v2 Endpoints + API Update #56

mitchos opened this issue Oct 22, 2021 · 2 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@mitchos
Copy link
Owner

mitchos commented Oct 22, 2021

What I'm looking for

I'm looking for some feedback on how we should consolidate the ZPA API.

Speaking with @daxm , it would be nice to reduce 'sprawl' and having a module for each API endpoint is going to make life difficult.

There are a lot of endpoints that could be functionally grouped, but aren't done so in the ZPA API reference. By consolidating these functionally, we make developing with pyZscaler easier.

Example of fragmentation

image

We started with connector_groups.py as that was the only App Connector endpoint. Now it makes sense to group both under zpa.app_connectors. From there we can have e.g. zpa.app_connectors.list_connectors and zpa.app_connectors.list_connector_groups.

Next steps

I'm happy to make first pass at mapping it out and grouping if anyone would like to review.
I'll update the issue once I've completed

Notes

This is going to result in some breaking changes when we rename modules but I'd rather do it now then later. We'll deprecate and link existing modules to the new ones for a grace period (any suggestions?).

@mitchos mitchos added help wanted Extra attention is needed question Further information is requested labels Oct 22, 2021
@mitchos mitchos self-assigned this Oct 22, 2021
@daxm
Copy link
Contributor

daxm commented Oct 25, 2021

I'm torn. I would like some sort of alignment between pyZscaler naming and the naming we see in the official API documentation. That said, the official API documentation layout has LONG titles that also contain special characters (like &) and the titles don't necessarily align with the name of the items they contain..

Using your pic example how would I "know" that the zpa.app_connectors.list_connectors aligns with /mgmtconfig/v1/admin/customers/{customerId}/connector?

At the moment I don't have an answer/solution but I do think we should figure a "mapping" method between the API docs and the pyZscaler methods that would allow a user to be able to translate. Further discussion methinks.

@jacobgarder
Copy link
Contributor

I have actually not worked with the ZPA at all yet, even though we will probably start using it soon. So I do not have any strong opinion about it. Will all APIs be implemented or is it some that are more heavily used?

I agree, long names are really cumbersome. I find it even a bit redundant that you for zia do:
zia.locations.list_locations() instead of just zia.locations.list()

..but its no good if the calls gets ambiguous either.. I will try to read a bit more about the ZPA-API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants