Chris Novak
Chris Novak

Reputation: 33

What is the unique ID for API Products in the Apigee Edge server API?

I am using the REST API for the Apigee Edge server, and am getting the details of the API products for my organization: https://api.enterprise.apigee.com/v1/organizations/chrisnovak/apiproducts/PremiumWeatherAPI

Here is the response:

{
  "apiResources" : [ ],
  "approvalType" : "auto",
  "attributes" : [ {
    "name" : "description",
    "value" : "Premium API Product to expose the weather API to developers"
  }, {
    "name" : "access",
    "value" : "public"
  }, {
    "name" : "developer.quota.limit",
    "value" : "10000"
  }, {
    "name" : "developer.quota.interval",
    "value" : "1"
  }, {
    "name" : "developer.quota.timeunit",
    "value" : "month"
  } ],
  "createdAt" : 1351796304109,
  "createdBy" : "[email protected]",
  "description" : "",
  "displayName" : "Weather API",
  "environments" : [ "test", "prod" ],
  "lastModifiedAt" : 1386812022110,
  "lastModifiedBy" : "[email protected]",
  "name" : "PremiumWeatherAPI",
  "proxies" : [ "weather" ],
  "quota" : "10000",
  "quotaInterval" : "1",
  "quotaTimeUnit" : "month",
  "scopes" : [ "READ" ]
}

However, I do not see a unique key in the response, and do not see any Apigee API reference documentation for API products around what the unique key is.

My questions are:

  1. What is the unique ID for the API products in the system?
  2. If there is not a unique ID, what happens if the API product is renamed? I need to be able to associate API products with documentation in an external system, and if the name changes, I will no longer be able to associate that documentation with that API product.

Upvotes: 3

Views: 495

Answers (3)

Jagjyot
Jagjyot

Reputation: 19

Name field is unique here.

You can test it by changing the name field and doing a POST for apiproducts. It will create an apiproduct with the same display name but different name field.

Then if you are using the same name field and editing just display name and trying to POST for apiproducts it will give error as below:

-bash-4.1$ POST /o/weatherapi/apiproducts -H "Accept: text/xml" -H "Content-Type: text/xml" -d @st.xml Test keymanagement.service.apiproduct_already_exists ApiProduct with name yahoo1 already exists -bash-4.1$

Upvotes: 1

Naveen kumar
Naveen kumar

Reputation: 59

The 'Name' field is the unique field here. if you change the display name it will not affect the name field, so you can go ahead and use the name field in your documentation.

Upvotes: 1

Mike Dunker
Mike Dunker

Reputation: 1990

Chris,

The unique ID is the name field. It is generated from the display name the first time you save the product. That never changes. Any later changes to the name change the displayName field but not the name.

Upvotes: 4

Related Questions