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
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!