How to set App Key "status" to revoked - Apigee x

I am using the following API Call to create my Custom Api Keys

https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.developers.apps.keys/create

This is the Payload:

{
    "consumerSecret": "mySecret",
    "consumerKey": "MyKey",
    "expiresInSeconds": "3600",
    "status": "revoked"
}

and the API Call returns

{
    "apiProducts": [],
    "consumerKey": "myKey",
    "consumerSecret": "mySecret",
    "expiresAt": "1678196921434",
    "issuedAt": "1678193321434",
    "status": "approved"
}

but I want to set the “status” as revoked. Is there any other API Call that can be use in this case ?

Have found this API Call which resolved what I needed.
https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.developers.apps.keys/updateDeveloperAppKey

1 Like