Unable to add a product to appkey through the rest api

Hi,

I am unable to add an apiProduct to an existing appKey by using the following API: (POST)

http://keng03-dev01-api-gtw98-app.int.dev.mykronos.com/v1/organizations/{org}/developers/{devloper_e...

Payload:

{ "apiProducts": [ "private"] }

But i am getting below error:

{ "code": "keymanagement.service.apiproducts_invalid", "message": "One or more ApiProduct is invalid", "contexts": [] }

0 5 217
5 REPLIES 5

Can you provide the output of

curl -i -n $mgmtserver/v1/o/$ORG/apiproducts

Is it true that there is an apiproduct named "private" in your Apigee organization?

Yes, we do have 2 products private and public

I got the below output after hitting this API:

http://{gateway_link}/v1/organizations/{Org}/apiproducts/

[ "PUBLIC", "PRIVATE" ]

Product names are case sensitive. If the list of products really is

[ “PUBLIC”, “PRIVATE” ]

then you need to use the uppercase string when adding the product to an app.

There are two products , PUBLIC and PRIVATE both are case sensitive.