API Platform Base Path: https://api.enterprise.apigee.com/v1/o/{org_name}
API Resource Path: /developers/{developer_email}/apps/{app_name}/keys/{consumer_key}
Adds an API product to a developer app key
Verb: POST
Auth: Basic AuthUpdates an existing developer app key with the specified API product, enabling the developer app that holds the key to access the URIs bundled in the API product. The API product(s) specified in request payload will be merged with existing API product(s) for this key.
Sample Request:$ curl -H "Content-type:application/json" -X POST -d \
'{
"apiProducts": ["ApiProduct_qa"],
"attributes" : [{
"name" : "region",
"value" : "south"
},{
"name" : "country",
"value" : "norway"
}]
}'
-u myname:mypass https://api.enterprise.apigee.com/v1/o/{myorg}/developers/{developerEmail}/apps/{appName}/keys/{consumerKey}
Request Payload Elements:
| Name | Description | Default | Required? |
|---|---|---|---|
| apiProducts | The name of the API Product to added to the Developer App Key | Yes | |
| attributes | Arbitrary name/value attributes added to the profile for the Developer App Key , usually used for app specific processing or metadata/analytics | No |
{
"apiProducts" : [ {
"apiproduct" : "ApiProduct",
"status" : "approved"
}, {
"apiproduct" : "ApiProduct_qa",
"status" : "approved"
} ],
"attributes" : [ {
"name" : "region",
"value" : "south"
}, {
"name" : "country",
"value" : "norway"
} ],
"consumerKey" : "0F2S7iCWcQ4mDQVGXwS5tgPAGWnNxo0q",
"consumerSecret" : "CciaOUKFPXVgBIGk",
"status" : "approved"
}
Response Payload Elements:
| Name | Description |
|---|---|
| apiproduct | The name of the API Product added to the Developer App Key |
| status | The status of the API Product |
| attributes | Arbitrary name/value pairs added by the client |
| consumerKey | The value of the Developer App Key to which the API Product was attached |
| consumerSecret | The value of the Developer App Key secret to which the API Product was attached |
| status | The status of the Consumer App Key (approved or pending). For API products whose approval type is set to "Manual", keys are returned in pending state and must be explicitly approved. |
{
"code" : "keymanagement.service.InvalidClientIdForGivenApp",
"message" : "Invalid consumer key for Given App",
"contexts" : [ ]
}
Last updated:
about 1 month ago