ibm-quantum / Hub-Automation

Apache License 2.0
9 stars 5 forks source link

Persistent 'Bad Request' 400 response for get_analytics_for_users #13

Open LauraMartinNQCC opened 1 month ago

LauraMartinNQCC commented 1 month ago

Hiya!

I have followed the code and documentation and am reasonably confident I am using the API correctly and that the analytics_data.csv is in the correct format and all valid values for the given user and hub. However, I get a persistent error in the below format:

Could not retrieve analytics for due to HTTPError: 400 Client Error: Bad Request for url: https://api-qcon.quantum-computing.ibm.com/api/Network//analytics/system-usage?options=%7B%22startDate%22%3A%2201-01-2024%22%2C%22endDate%22%3A%2207-31- 2024%22%2C%22backend%22%3A%22%22%2C%20%22userId%22%3A%%22%7D

I removed my specific data for obvious reasons.

I added some extra error handling and got:

Response content: b'{"error":{"statusCode":400,"name":"OPERATION_FAILED","message":"Request failed with status code 500","code":2413}}'

It should be noted that my API key and access tokens/the API URL are fine for other API calls - such as backend info calls - so this isn't credential-related.

Any ideas what could be going wrong?