Content-Length: 219318 | pFad | http://github.com/googleapis/google-api-python-client/issues/2579

61 Org Units with + and # in their names can not be gotten · Issue #2579 · googleapis/google-api-python-client · GitHub
Skip to content

Org Units with + and # in their names can not be gotten #2579

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

Open
taers232c opened this issue Mar 13, 2025 · 0 comments
Open

Org Units with + and # in their names can not be gotten #2579

taers232c opened this issue Mar 13, 2025 · 0 comments
Assignees

Comments

@taers232c
Copy link

GAM is using the Google API Python client and making calls like this: cd is the Directory service object.

      result = callGAPI(cd.orgunits(), 'get',                                                                                                                                                        
                        customerId=GC.Values[GC.CUSTOMER_ID], orgUnitPath=orgUnitPath)                                                                                            

If the orgUnitPath contains + or #, the URL is not correct.

1: Get OU "Test/Test % Percent"
send: b'GET /admin/directory/v1/customer/my_customer/orgunits/Test/Test%20%25%20Percent?prettyPrint=true&alt=json HTTP/1.1\r\nHost: admin.googleapis.com\r\naccept: application/json\r\naccept-encoding: gzip, deflate\r\nuser-agent: GAM 7.05.08 - https://github.com/GAM-team/GAM / GAM Team <google-apps-manager@googlegroups.com> / Python 3.13.2 final / macOS-15.3.2-arm64-arm-64bit-Mach-O arm64 / (gzip)\r\nx-goog-api-client: gdcl/2.164.0 gl-python/3.13.2 cred-type/u\r\ncontent-length: 0\r\nauthorization: Bearer ya29.xxx\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'

Works

2: Get OU "Test/Test + Plus"
send: b'GET /admin/directory/v1/customer/C03pmm8ne/orgunits/Test/Test%20+%20Plus?prettyPrint=true&alt=json HTTP/1.1\r\nHost: admin.googleapis.com\r\naccept: application/json\r\naccept-encoding: gzip, deflate\r\nuser-agent: GAM 7.05.08 - https://github.com/GAM-team/GAM / GAM Team <google-apps-manager@googlegroups.com> / Python 3.13.2 final / macOS-15.3.2-arm64-arm-64bit-Mach-O arm64 / (gzip)\r\nx-goog-api-client: gdcl/2.164.0 gl-python/3.13.2 cred-type/u\r\ncontent-length: 0\r\nauthorization: Bearer ya29.xxx\r\n\r\n'
reply: 'HTTP/1.1 404 Not Found\r\n'

Fails, + was not URL encoded, it should be 'Test%20%2B%20Plus'

3: Get OU "Test/Test # Sharp"
send: b'GET /admin/directory/v1/customer/my_customer/orgunits/Test/Test%20 HTTP/1.1\r\nHost: admin.googleapis.com\r\naccept: application/json\r\naccept-encoding: gzip, deflate\r\nuser-agent: GAM 7.05.08 - https://github.com/GAM-team/GAM / GAM Team <google-apps-manager@googlegroups.com> / Python 3.13.2 final / macOS-15.3.2-arm64-arm-64bit-Mach-O arm64 / (gzip)\r\nx-goog-api-client: gdcl/2.164.0 gl-python/3.13.2 cred-type/u\r\ncontent-length: 0\r\nauthorization: Bearer ya29.xxx\r\n\r\n'
reply: 'HTTP/1.1 404 Not Found\r\n'

Fails, '%23%20Sharp?prettyPrint=true&alt=json' is all missing before HTTP
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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/googleapis/google-api-python-client/issues/2579

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy