Dayforce recommended way to deal with changing dayforce_release in URL · Issue #14 · goodeggs/dayforce-client · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Dayforce object in the client.py module requires the current Dayforce release number to work. This is problematic because this number can change without warning and break any automated applications that rely on this package.
The recommended way (as stated in Dayforce RESTful Web Services Developer Guide - Release 61, pg. 20) is to use this base URL: https://www.dayforcehcm.com/api instead of a URL with the release number like: https://us61-services.dayforcehcm.com/api
When you make a call to the recommended base URL, it is automatically redirected to the proper URL (with the release number). I tested this and it works so long as you keep in mind the behaviour of the Requests package. Since the redirects are to a different hostname (even if only the subdomain changes), the Requests module will strip the Authentication. I tested this using the Authentication in the headers, but the behaviour appears to be the same for basic authentication used in client.py. This means that you need to first get the redirect URL and then make a second request with the authentication.
Given that the recommended usage can be made to work in Python, was there a design choice for why dayforce-client.dayforce.py requires the release number to be specified manually?
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
The
Dayforce
object in theclient.py
module requires the current Dayforce release number to work. This is problematic because this number can change without warning and break any automated applications that rely on this package.The recommended way (as stated in Dayforce RESTful Web Services Developer Guide - Release 61, pg. 20) is to use this base URL:
https://www.dayforcehcm.com/api
instead of a URL with the release number like:
https://us61-services.dayforcehcm.com/api
When you make a call to the recommended base URL, it is automatically redirected to the proper URL (with the release number). I tested this and it works so long as you keep in mind the behaviour of the Requests package. Since the redirects are to a different hostname (even if only the subdomain changes), the Requests module will strip the Authentication. I tested this using the Authentication in the headers, but the behaviour appears to be the same for basic authentication used in
client.py
. This means that you need to first get the redirect URL and then make a second request with the authentication.Given that the recommended usage can be made to work in Python, was there a design choice for why
dayforce-client.dayforce.py
requires the release number to be specified manually?The text was updated successfully, but these errors were encountered: