8000 Dayforce recommended way to deal with changing dayforce_release in URL · Issue #14 · goodeggs/dayforce-client · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Dayforce recommended way to deal with changing dayforce_release in URL #14

New issue

Ha 89EC ve 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

Open
MinuraSilva opened this issue Nov 8, 2021 · 0 comments

Comments

@MinuraSilva
Copy link
MinuraSilva commented Nov 8, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0