簡體   English   中英

Apigee Edge服務器API中API產品的唯一ID是什么?

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

我正在為Apigee Edge服務器使用REST API,並且正在為我的組織獲取API產品的詳細信息: https ://api.enterprise.apigee.com/v1/organizations/chrisnovak/apiproducts/PremiumWeatherAPI

以下是回復:

{
  "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" : "noreply_admin@apigee.com",
  "description" : "",
  "displayName" : "Weather API",
  "environments" : [ "test", "prod" ],
  "lastModifiedAt" : 1386812022110,
  "lastModifiedBy" : "cnovak@apigee.com",
  "name" : "PremiumWeatherAPI",
  "proxies" : [ "weather" ],
  "quota" : "10000",
  "quotaInterval" : "1",
  "quotaTimeUnit" : "month",
  "scopes" : [ "READ" ]
}

但是,我沒有在響應中看到唯一的鍵,並且沒有看到有關唯一鍵的API產品的任何Apigee API參考文檔

我的問題是:

  1. 系統中API產品的唯一ID是什么?
  2. 如果沒有唯一ID,那么重命名API產品會發生什么? 我需要能夠將API產品與外部系統中的文檔相關聯,如果名稱發生變化,我將無法再將該文檔與該API產品相關聯。

克里斯,

唯一ID是名稱字段。 它是在您第一次保存產品時從顯示名稱生成的。 這永遠不會改變。 對名稱的任何后續更改都會更改displayName字段,但不會更改名稱。

“名稱”字段是此處的唯一字段。 如果更改顯示名稱,則不會影響名稱字段,因此您可以繼續使用文檔中的名稱字段。

名稱字段在這里是唯一的。

您可以通過更改名稱字段並為apiproducts執行POST來測試它。 它將創建一個具有相同顯示名稱但名稱字段不同的apiproduct。

然后,如果您使用相同的名稱字段並僅編輯顯示名稱並嘗試POST for apiproducts,則會出現如下錯誤:

-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名稱為yahoo1的ApiProduct已經存在-bash-4.1 $

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM