From ef406575845823429feb03d9c2cddea40c2084a2 Mon Sep 17 00:00:00 2001 From: Divyajose Date: Mon, 10 Nov 2025 18:24:07 +0530 Subject: [PATCH 1/2] Added endpoint to update scope when apiproduct is added (#422) --- .../AppGroupAppCredentialController.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Api/ApigeeX/Controller/AppGroupAppCredentialController.php b/src/Api/ApigeeX/Controller/AppGroupAppCredentialController.php index 0945cbb09..a9419a7ec 100644 --- a/src/Api/ApigeeX/Controller/AppGroupAppCredentialController.php +++ b/src/Api/ApigeeX/Controller/AppGroupAppCredentialController.php @@ -19,6 +19,7 @@ namespace Apigee\Edge\Api\ApigeeX\Controller; use Apigee\Edge\Api\Management\Controller\CompanyAppCredentialController; +use Apigee\Edge\Api\Management\Entity\AppCredentialInterface; use Apigee\Edge\ClientInterface; use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; @@ -51,6 +52,29 @@ public function __construct( parent::__construct($organization, $appGroup, $appName, $client, $entitySerializer); } + /** + * Modify (override) scopes of a customer key. + * + * @param string $consumerKey + * The consumer key to modify. + * @param string[] $scopes + * + * @return AppCredentialInterface + */ + public function overrideAppGroupScopes(string $consumerKey, array $scopes): AppCredentialInterface + { + $response = $this->client->post( + $this->getEntityEndpointUri($consumerKey), + (string) json_encode((object) ['appGroupAppKey' => ['scopes' => $scopes]]) + ); + + return $this->entitySerializer->deserialize( + (string) $response->getBody(), + $this->getEntityClass(), + 'json' + ); + } + /** * {@inheritdoc} */ From 0aefa2cbaa3ddd956890b27e59c8287fc98a076c Mon Sep 17 00:00:00 2001 From: Divyajose Date: Mon, 17 Nov 2025 16:39:36 +0530 Subject: [PATCH 2/2] Bump version to 3.0.10 and changelog (#449) --- CHANGELOG.md | 3 +++ src/ClientInterface.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6ed34c1e..d93c96cac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # CHANGELOG +## [3.0.10](https://github.com/apigee/apigee-client-php/milestone/37?closed=1) +* [#422] Support to update AppGroup app credential scope object. + ## [3.0.9](https://github.com/apigee/apigee-client-php/milestone/34?closed=1) * [#409] Changed the getter and setter to camelcase function name. * [#420] Support for drz endpoint. diff --git a/src/ClientInterface.php b/src/ClientInterface.php index 1f29f0d22..e9e724757 100644 --- a/src/ClientInterface.php +++ b/src/ClientInterface.php @@ -63,7 +63,7 @@ interface ClientInterface extends HttpClient */ public const APIGEE_ON_GCP_ENDPOINT = 'https://apigee.googleapis.com/v1'; - public const VERSION = '3.0.9'; + public const VERSION = '3.0.10'; /** * Allows access to the last request, response and exception.