Legacy Dev Forum Posts

 View Only

Sign Up

Schedule Groups response has missing quotes and malformed data

  • 1.  Schedule Groups response has missing quotes and malformed data

    Posted 06-05-2025 18:09

    Dewald_Smit | 2023-06-08 12:42:45 UTC | #1

    Good day All,

    I am running into an issue with the following request response on Python SDK. scheduleGroups = architectApi.getarchitectschedulegroups(pagesize=100) The Date fields values are coming back as below: 'datecreated': datetime.datetime(2020, 9, 28, 8, 59, 59, 502000, tzinfo=tzutc()), 'date_modified': datetime.datetime(2023, 5, 24, 9, 38, 18, 972000, tzinfo=tzutc()),

    This causes issues when trying to work with the JSON as the value is not encapsulated in quotes. I'm also not sure why it shows the value as datetime.datetime, is this not supposed to be a text str value?

    I am expecting the results to match the API Explorer results:

    Any assistance and or clarity would be much appreciated.


    John_Carnell | 2023-06-08 13:48:25 UTC | #2

    Hi Dewald,

    The Python SDK returns a Python object and not a JSON object. The SDKs provide native language wrappers for all request and response calls. If you want to parse the native JSON from the Python object, you can use the following function in the utils.py function: https://github.com/MyPureCloud/platform-client-sdk-python/blob/7ebc0a17b6d66c6c4cf5b5f8f60354feafea273c/build/PureCloudPlatformClientV2/utils.py#LL10C4-L10C36

    Thanks, John Carnell Director, Developer Engagement


    Dewald_Smit | 2023-06-08 20:50:29 UTC | #3

    John_Carnell, post:2, topic:20323
    ll request and response calls. If you want to parse the native JSON from the Python object, you can use

    Thanks John, could you advise how to call/import this module? Edit: Is the utils.py installed with the SDK or do i need to get it?


    system | 2023-07-09 15:03:54 UTC | #4

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


    This post was migrated from the old Developer Forum.

    ref: 20323