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

Response to ReportsAPI with date values return null for Resellers #1761

Open
stephengale801 opened this issue Mar 5, 2025 · 1 comment
Open
Assignees
Labels

Comments

@stephengale801
Copy link

Full steps to reproduce the issue:

  1. As a reseller, authorize the Reports API
  2. Run gam config customer_id <customer_id_of_client> report usage user select <user_on_customer_tenant> parameters accounts:creation_time start -4d

Expected outcome (what are you trying to do?):
Based on outcome of the Developer Tools "Try this API" content should be displayed

Actual outcome (what errors or bad behavior do you see instead?):
Date entries are converted to null.

DEBUG results (minus BEARER Tokens):

gam config debug_level 1 report usage user select sgale@gedu.demo.burwood.com fields accounts:creation_time start -4d
connect: (admin.googleapis.com, 443)

send: b'GET /$discovery/rest?version=reports_v1 HTTP/1.1\r\nHost: admin.googleapis.com\r\ncontent-length: 0\r\nuser-agent: GAMADV-XTD3 7.05.06 - https://github.com/taers232c/GAMADV-XTD3 / Ross Scroggs <ross.scroggs@gmail.com> / Python 3.12.8 final / Linux-5.10.0-30-cloud-amd64-x86_64-with-glibc2.31 x86_64 /\r\nx-goog-api-client: cred-type/u\r\nauthorization: 
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json; charset=UTF-8
header: Vary: Origin
header: Vary: X-Origin
header: Vary: Referer
header: Date: Wed, 05 Mar 2025 16:45:43 GMT
header: Server: ESF
header: Content-Length: 65490
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff

send: b'GET /admin/reports/v1/usage/users/sgale%40gedu.demo.burwood.com/dates/2025-03-01?customerId=C048e2u5w&parameters=accounts%3Acreation_time&prettyPrint=true&alt=json HTTP/1.1\r\nHost: admin.googleapis.com\r\naccept: application/json\r\naccept-encoding: gzip, deflate\r\nuser-agent: GAMADV-XTD3 7.05.06 - https://github.com/taers232c/GAMADV-XTD3 / Ross Scroggs <ross.scroggs@gmail.com> / Python 3.12.8 final / Linux-5.10.0-30-cloud-amd64-x86_64-with-glibc2.31 x86_64 / (gzip)\r\nx-goog-api-client: gdcl/2.156.0 gl-python/3.12.8 cred-type/u\r\ncontent-length: 0\r\nauthorization: 
reply: 'HTTP/1.1 200 OK\r\n'
header: ETag: "Q2wdLbL3uU3dCErIqIIQxNklhNhKW_YSwCPygsTEG0M/TUSUMREbcv5Ez03wyllzZ9pXhAw"
header: Content-Type: application/json; charset=UTF-8
header: Vary: Origin
header: Vary: X-Origin
header: Vary: Referer
header: Content-Encoding: gzip
header: Date: Wed, 05 Mar 2025 16:45:43 GMT
header: Server: ESF
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff
header: Transfer-Encoding: chunked
Got 1 Report for sgale@gedu.demo.burwood.com on 2025-03-01...

send: b'GET /admin/reports/v1/usage/users/sgale%40gedu.demo.burwood.com/dates/2025-03-02?customerId=C048e2u5w&parameters=accounts%3Acreation_time&prettyPrint=true&alt=json HTTP/1.1\r\nHost: admin.googleapis.com\r\naccept: application/json\r\naccept-encoding: gzip, deflate\r\nuser-agent: GAMADV-XTD3 7.05.06 - https://github.com/taers232c/GAMADV-XTD3 / Ross Scroggs <ross.scroggs@gmail.com> / Python 3.12.8 final / Linux-5.10.0-30-cloud-amd64-x86_64-with-glibc2.31 x86_64 / (gzip)\r\nx-goog-api-client: gdcl/2.156.0 gl-python/3.12.8 cred-type/u\r\ncontent-length: 0\r\nauthorization: 
reply: 'HTTP/1.1 200 OK\r\n'
header: ETag: "Q2wdLbL3uU3dCErIqIIQxNklhNhKW_YSwCPygsTEG0M/ZzORuq09hr2KyxCvFaVkKsKe0DE"
header: Content-Type: application/json; charset=UTF-8
header: Vary: Origin
header: Vary: X-Origin
header: Vary: Referer
header: Content-Encoding: gzip
header: Date: Wed, 05 Mar 2025 16:45:44 GMT
header: Server: ESF
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff
header: Transfer-Encoding: chunked
Got 1 Report for sgale@gedu.demo.burwood.com on 2025-03-02...

send: b'GET /admin/reports/v1/usage/users/sgale%40gedu.demo.burwood.com/dates/2025-03-03?customerId=C048e2u5w&parameters=accounts%3Acreation_time&prettyPrint=true&alt=json HTTP/1.1\r\nHost: admin.googleapis.com\r\naccept: application/json\r\naccept-encoding: gzip, deflate\r\nuser-agent: GAMADV-XTD3 7.05.06 - https://github.com/taers232c/GAMADV-XTD3 / Ross Scroggs <ross.scroggs@gmail.com> / Python 3.12.8 final / Linux-5.10.0-30-cloud-amd64-x86_64-with-glibc2.31 x86_64 / (gzip)\r\nx-goog-api-client: gdcl/2.156.0 gl-python/3.12.8 cred-type/u\r\ncontent-length: 0\r\nauthorization: 
reply: 'HTTP/1.1 200 OK\r\n'
header: ETag: "Q2wdLbL3uU3dCErIqIIQxNklhNhKW_YSwCPygsTEG0M/PJmFFQqvWY2Coqn8Sml4uzKmxXw"
header: Content-Type: application/json; charset=UTF-8
header: Vary: Origin
header: Vary: X-Origin
header: Vary: Referer
header: Content-Encoding: gzip
header: Date: Wed, 05 Mar 2025 16:45:44 GMT
header: Server: ESF
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff
header: Transfer-Encoding: chunked
Got 1 Report for sgale@gedu.demo.burwood.com on 2025-03-03...

send: b'GET /admin/reports/v1/usage/users/sgale%40gedu.demo.burwood.com/dates/2025-03-04?customerId=C048e2u5w&parameters=accounts%3Acreation_time&prettyPrint=true&alt=json HTTP/1.1\r\nHost: admin.googleapis.com\r\naccept: application/json\r\naccept-encoding: gzip, deflate\r\nuser-agent: GAMADV-XTD3 7.05.06 - https://github.com/taers232c/GAMADV-XTD3 / Ross Scroggs <ross.scroggs@gmail.com> / Python 3.12.8 final / Linux-5.10.0-30-cloud-amd64-x86_64-with-glibc2.31 x86_64 / (gzip)\r\nx-goog-api-client: gdcl/2.156.0 gl-python/3.12.8 cred-type/u\r\ncontent-length: 0\r\nauthorization: 
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Vary: Origin
header: Vary: X-Origin
header: Vary: Referer
header: Content-Type: application/json; charset=UTF-8
header: Content-Encoding: gzip
header: Date: Wed, 05 Mar 2025 16:45:44 GMT
header: Server: ESF
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff
header: Transfer-Encoding: chunked
ERROR:  JSON: {'error': {'code': 400, 'message': 'Data for dates later than 2025-03-03 is not yet available. Please check back later', 'errors': [{'message': 'Data for dates later than 2025-03-03 is not yet available. Please check back later', 'domain': 'global', 'reason': 'invalid'}]}}

WARNING: Data for dates later than 2025-03-03 is not yet available. Please check back later


date,user,accounts:creation_time
2025-03-01,sgale@gedu.demo.burwood.com, 
2025-03-02,sgale@gedu.demo.burwood.com, 
2025-03-03,sgale@gedu.demo.burwood.com, 

Image

@taers232c
Copy link
Contributor

taers232c commented Mar 5, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants