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

Calling ticket metrics is raising an error #571

Closed
rc-abodkins opened this issue Sep 6, 2023 · 4 comments
Closed

Calling ticket metrics is raising an error #571

rc-abodkins opened this issue Sep 6, 2023 · 4 comments

Comments

@rc-abodkins
Copy link

Hey,

Zenpy has been extremely helpful in pulling data utilizing the Zendesk API. I was running some code last week that was working (end of August) however when trying to run the same code September 5th, 2023 it's raising an exception. Tried a few different methods to but encountering the same problem.

I'm trying to get the ticket_metrics for a specific ticket based on it's id. This code worked
metrics = zenpy_client.ticket.metrics(ticket.id)

However running it now I get the following error:

/usr/local/lib/python3.10/dist-packages/zenpy/lib/api.py in _check_response(self, response)
353 response=response)
354 else:
--> 355 raise APIException(json.dumps(_json), response=response)
356 except ValueError:
357 response.raise_for_status()

APIException: {"error": {"title": "Invalid attribute", "message": "You passed an invalid value for the page attribute. Invalid parameter: page must be an integer from api/v2/ticket_metrics/show"}}

I get this error when I change the code to metrics = zenpy_client.ticket.metrics(ticket=ticket.id) or metrics = zenpy_client.ticket.metrics(ticket=ticket)

The API endpoint I want to hit from Zendesk is /api/v2/tickets/{ticket_id}/metrics

Thank you!

@cryptomail
Copy link
Collaborator

YOUCH! This could be an inadvertent result from an overly aggressive CBP campaign :)
On it. Give me a day or two....terribly sorry you got hit from this @rc-abodkins

@cryptomail
Copy link
Collaborator

Found attribution. Fixing

@cryptomail
Copy link
Collaborator

2.0.36 SHOULD remediate.

@rc-abodkins
Copy link
Author

Amazing thank you so much! Really appreciate it!

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

2 participants