Hi Isaac,
Thank you for reaching out to us. I see that you want to connect the Campaign ID to the Ad Group when you call it in a request or reporting query. You are able to do this by querying
campaign ID while querying
AdGroup metrics and fields, as AdGroup supports Campaign fields (as shown in the attributed resources section of the AdGroup Reporting documentation). Let me know if you have further questions.
Thank you,
Bryan, Google Ads API Team

ref:_00D1U1174p._5004Q1zsGLJ:ref