apigee / apigee-edge-drupal

The Apigee Edge module enables you to integrate a Drupal 9 or 8 site with Apigee.
https://www.drupal.org/project/apigee_edge
GNU General Public License v2.0
32 stars 44 forks source link

Get Team/Company information from Apigee X in custom module #1027

Closed mchauhan260 closed 4 months ago

mchauhan260 commented 4 months ago

Hi Team,

I am using apigee-x with drupal 10, I wanna Get Team/Company information from Apigee X in a custom module.

I tried below code, but it's not working. In exception handling I am getting 404 error : $sdk_connector = \Drupal::service('apigee_edge.sdk_connector'); $client = $sdk_connector->getClient(); $endpoint = $client->getUriFactory() ->createUri("/organizations/{$sdk_connector->getOrganization()}/companies/test-company"); $response = $client->get($client->getEndpoint() . $endpoint);

Can you please help me with this?

mchauhan260 commented 4 months ago

I think I have figured it out. As for me, I was using the wrong keyword. I need to use "app groups" instead of "companies."

shishir-intelli commented 4 months ago

Hi @mchauhan260

In Apigee X, AppGroups are used to represents a relationship between one or more apps that are managed by the same set of people (Teams)

Companies are for Apigee Edge organization.

So please use AppGroup for Apigee X organization. See here to refer Apigee X AppGroups API documentation.

mchauhan260 commented 4 months ago

Thanks!! Are you aware if any issue with attributes of teams not getting saved for Apigee X in drupal10?

shishir-intelli commented 4 months ago

There was one issue here https://github.com/apigee/apigee-client-php/issues/343 If this is the same issue you are facing, then please update the Apigee edge module to the latest version.

mchauhan260 commented 4 months ago

Thanks!! You are a savior

shishir-intelli commented 4 months ago

Welcome! 😊

Closing this issue for now, feel free to reopen for any further help.