Skip to content
New issue

Have 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

Does the _return_http_data_only parameter work? #4

Open
StevenTollanis opened this issue Mar 2, 2023 · 0 comments
Open

Does the _return_http_data_only parameter work? #4

StevenTollanis opened this issue Mar 2, 2023 · 0 comments

Comments

@StevenTollanis
Copy link

Hey,

I'm trying to use the get_device_datasource_data_by_id method but also want to get the headers, my current call is like below:

api_response = api_instance.get_device_datasource_data_by_id(ds["DeviceId"], ds["DataSourceRecordId"], start=twenty_four_hours_ago, end=now, _return_http_data_only=False)

But still just getting the JSON response without any other info.

When I try to print its type, it's just

print(type(api_response))
<class 'logicmonitor_sdk.models.device_data_source_data.DeviceDataSourceData'>

I review the code on logicmonitor_sdk\api_client.py line 179, and from this I learned that I had to add _return_http_data_only, are there any other parameter I need to enable?

 if _return_http_data_only:
            return (return_data)
        else:
            return (return_data, response_data.status,
                    response_data.getheaders())

Thanks for the help

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