MattParr / python-atws

Autotask Web Services python module
MIT License
32 stars 10 forks source link

Autotask API Version 1.6 #55

Closed mtingers closed 5 years ago

mtingers commented 5 years ago

Hi Matt,

A new API version 1.6 was recently released and I'm opening this issue to get it on your radar (assuming you're still actively maintaining this module).

Please see: API Revision History

API 1.6 New Requirements

API 1.6 Docs

I think the current code will work as-is, but I will be testing in the coming weeks to identify if there are other changes outside of the API user restrictions and SSL/TLS that may break things.

The primary issues will likely revolve around handling the configuration change here: AUTOTASK_API_BASE_URL

My initial thoughts on handling this new version (there are probably better ways):

Make the API version selectable in a major release version of this module, but default to the latest 1.6. Deprecate version 1.5 with a warning message. Example:

at = atws.connect(username='..', password='..', api_version='1.5')
## WARNING: AutoTask API version 1.5 is deprecated. Please transition to using the latest 1.6 API.

Thanks for you work on this project!

MattParr commented 5 years ago

I'll aim to support 1.6 by the end of March. There is a requirement for two new soap headers and one new connection attribute. I think I will presume if the new Identifier is supplied then 1.6 else 1.5. This should mean everything keeps working for 1.5 with no exposed changes.

ChezDaniela commented 5 years ago

Great news Matt! Did you get it already tested on 1.6?

ryanchausse commented 5 years ago

Hi Matt, thanks for your work on this excellent project. Just taking a brief look at this:

Looks like this will involve overriding a SUDS method to provide the custom SOAP header attribute. Perhaps something to do with suds.sax.attribute and/or suds.sax.element or MessagePlugin? I don't know what the most "elegant" way of adding this to atws would be yet.

Are you close to an update or do you have any strong opinions about how this should be implemented? Maybe I can offer assistance?

hoerup commented 5 years ago

For integrationCode header see #57

ryanchausse commented 5 years ago

Thanks @hoerup! I've submitted a pull request for v1.6 support based on your contribution.