API Platform Base Path: https://api.enterprise.apigee.com/v1/o/{org_name}
API Resource Path: /companies/{company_name}/apps/{app_ame}/keys/{consumer key}
Update existing company app key with additional API product(s).
Verb: POST
Auth: Basic AuthUpdate existing App Key with New ApiProduct(s). New ApiProduct(s) will merge existing ApiProduct(s).
Sample Request:$ curl -H "Content-type:application/json" -X POST -d \
'{
"apiProducts" : ["TestApiProduct1","TestApiProduct2"],
"attributes" : [ {
"name" : "region",
"value" : "west"
} ]
}' \
https://api.enterprise.apigee.com/v1/o/{org_name}/companies/{company_name}/apps/{app_name}/keys/{consumer_key} \
-u myname:mypass
Request Payload Elements:
| Name | Description | Default | Required? |
|---|---|---|---|
| apiProducts | An array of API Product names to be associated with this key | N/A | Yes |
| attributes | Arbitrary, app-specific attributes associated with this key | N/A | No |
{
"apiProducts" : [ {
"apiproduct" : "TestApiProduct1",
"status" : "approved"
}, {
"apiproduct" : "TestApiProduct2",
"status" : "approved"
} ],
"attributes" : [ {
"name" : "region",
"value" : "west"
} ],
"consumerKey" : "{consumer_key}",
"consumerSecret" : "{consumer_secret}",
"status" : "approved"
}
Response Payload Elements:
| Name | Description |
|---|---|
| apiproduct | An API Product associated with this key |
| status | The status of the key for this API Product |
| attributes | Arbitrary, app-specific attributes associated with this key |
| consumerKey | The value of the key |
| consumerSecret | The value of the secret associated with this key |
Failure 4xx with proper error message
{
"code" : "keymanagement.service.InvalidClientIdForGivenApp",
"message" : "Invalid consumer key for Given App",
"contexts" : [ ]
}
Last updated:
13 days ago