hnin
May 9, 2022, 6:07am
1
Hi,
I need to call this api using python SDH
POST /api/v2/workforcemanagement/adherence/historical
This is the Attribute error I get when I make an api call
AttributeError: module 'PureCloudPlatformClientV2.apis.workforce_management_api' has no attribute 'post_workforcemanagement_adherence_historical'
although I see the function in the library at line 7474 /workforce_management_api.py
Any guidance is appreciated. Thank you.
Hello,
I am not able to reproduce your issue. Do you mind sharing a snippet of your script?
Thanks
hnin
May 11, 2022, 11:08pm
3
Hello Ebenezer,
I was able to trigger the API finally according to example given in the documentation this way.
api_client = PureCloudPlatformClientV2.api_client.ApiClient().get_client_credentials_token(CLIENT_ID, CLIENT_SECRET)
PureCloudPlatformClientV2.configuration.access_token = api_client.access_token
api_instance = PureCloudPlatformClientV2.WorkforceManagementApi()
api_response = api_instance.post_workforcemanagement_adherence_historical(body=body)
Thank you for the response. Regards,
Hnin
system
Closed
June 11, 2022, 11:08pm
4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.