Workforce Management API

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

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

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.