Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Update appGroup app - Apigee API not working as expected

When using the Apigee API to update and appGroup App, the endpoint does not work effectively.
This is a bug with this endpoint and method:

PUT https://apigee.googleapis.com/v1/{name=organizations/*/appgroups/*/apps/*}

Steps to reproduce:

  1. Create an appGroup App with a set of credentials with the app in an "approved" status.
  2. Make a PUT request (as per reference document below) with status as "revoked", and omitting the credentials in the request body.

Expected Result:

  • The app has a status of "revoked"
  • The app's credentials are removed as they were omitted from the request body.

Actual Result: 

  • The app is still in "approved" status
  • The app's credentials are still there.

Reference documentation: https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.appgroups.apps/upda...

Solved Solved
2 3 336
1 ACCEPTED SOLUTION

Thank you for reporting this - I'll pass this on to our team for investigation.

View solution in original post

3 REPLIES 3

Thank you for reporting this - I'll pass this on to our team for investigation.

Hello @davidfreeman, thank you for your patience - I've received the following from Engineering

There are two distinct actions here in the Update API:

  • Update status of the app by approving or revoking the consumer key - the "action" parameter needs to be set to "approve" or "revoke" with an empty request body
  • Updating the details of the AppGroup - by including an updated AppGroup instance in the request body

Would you be able to try these actions separately and see if you are still seeing the same issues? It's not optimal that the API design cannot handle both, and at minimum the documentation should be updated, but I'd like to confirm the reproducible functionality first. 

I have tried this, and was partially successful:

  1. Update status of the app by approving or revoking the consumer key - the "action" parameter needs to be set to "approve" or "revoke" with an empty request body.
    Result - this worked ✔️
    example API call:

 

curl --location --request PUT 'https://apigee.googleapis.com/v1/organizations/apigeex-sonrai/appgroups/my-app-group/apps/test_with_revoked?action=revoke' \
--header 'Authorization: Bearer --redacted--' \
--header 'Content-Type: application/octet-stream'​



 

  • Updating the details of the AppGroup - by including an updated AppGroup instance in the request body (NOTE: in my case removing the credentials by omitting them from the body of the PUT call)
    Result - Failed 
    example API call (note: I have tried many different inclusions in the body to no effect on the AppGroup App):

 

curl --location --request PUT 'https://apigee.googleapis.com/v1/organizations/apigeex-sonrai/appgroups/8d8d7c43-e3a4-4de1-8306-17d7953aa490/apps/test_with_products' \
--header 'Authorization: Bearer --redacted--' \
--header 'Content-Type: application/json' \
--data '{
    "appId": "07f37acc-a0b2-42bf-bdba-870f15b13599",
    "attributes": [
        {
            "name": "DisplayName",
            "value": "test-app-17-juln-24"
        },
        {
            "name": "Notes",
            "value": "Test app for testing test stuff"
        }
    ],
    "createdAt": "1721004294589",
    "credentials": [

    ],
    "lastModifiedAt": "1721004294589",
    "name": "test_with_revoked",
    "status": "revoked",
    "appGroup": "my-app-group"
}'​



 

To remove the credentials from the AppGroup App I instead used this endpoint successfully:

 

https://apigee.googleapis.com/v1/organizations/:org/appgroups/:appgroup/apps/:app/keys/:key

 

 

The still leaves the challenges for updating any other attribute on an AppGroup App though.