Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

I can't delete all the scopes added to my app using the API

I can't delete all the scopes added to my app using the API. It returns 200 but scopes are already there.

As you see a empty list is sent but in the response always the whole list is returned.(for this message I replace right values with * or XXX).

I am using this reference in the documentation: https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.developers.apps.key... 

 

curl --request PUT \
  'https://apigee.googleapis.com/v1/organizations/*/developers/*/apps/Testing/keys/XXX?key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"scopes":[]}' \
  --compressed

 

 

 

0 1 180
1 REPLY 1

razvanbulzan
Former Googler

Hello!

I might've caught the issue here, the documentation you provided is for replacement so PUT requests.

If you want to delete, you need to use the method DELETE refer to this documentation here.

The PUT method replaces all current representations of the target resource with the request payload. The DELETE method deletes the specified resource.

Hope this helps!