- Nonexistent node nid: 4501.
- Nonexistent node nid: 4493.
- Nonexistent node nid: 4490.
Overview
This document describes changes to the /apps API resource that is defined in the Apigee API Platform API. This change only impacts the /apps API resource.
Apps are represented in three ways in the API Platform API:
- Nonexistent node nid: 4501.: All apps registered in an Apigee organization
- Nonexistent node nid: 4493.: All apps registered by a developer in an Apigee organization
- Nonexistent node nid: 4490.: All apps registered by a company in an Apigee organization
Previously, an app's name was required to be unique across an entire Apigee organization. In other words, a company or a developer could not create an app with the same name as one created by another company or developer. This placed an unnecessary constraint on app naming, so we decided modify the API slightly such that apps are identified by a globally unique appID as well as by an appName. This enables developers or companies within the same Apigee organization to create apps with the same name.
The most visibile change is the addition of an appID to the app profile. For example,:
"appId" : "d6dafdc5-4243-45b5-8a04-25acc42a0913"
A request to /apps against the previous API returned an array of app names:
Sample request:
$ curl -u myname:mypass -X GET https://api.enterprise.apigee.com/v1/o/{myorg}/apps
Sample response:
[ "weatherapp", "SampleApp", "MyTestApp" ]
A request to /apps against the new API returns an array of appIDs:
Sample request:
$ curl -u myname:mypass -X GET htps://api.enterprise.apigee.com/v1/o/{myorg}/apps
Sample response:
[ "d6dafdc5-4243-45b5-8a04-25acc42a0913", "011f9877-0b65-4040-9d78-d84761cc7430", "980790ce-8bbf-4457-a345-7ff8c56ada79" ]
The app profile has been modified to add an appID element. A request to /apps/{appName} against the previous API returned an app profile that did not contain an appID:
Sample request:
$ curl -u myname:mypass -X GET https://api.enterprise.apigee.com/v1/o/{myorg}/apps/weatherapp
Sample response:
{
"accessType" : "",
"appFamily" : "default",
"attributes" : [ ],
"callbackUrl" : "login.weatherapp.com",
"createdAt" : 1349797216488,
"createdBy" : "admin@apigee.com",
"credentials" : [ {
"apiProducts" : [ {
"apiproduct" : "weather_free",
"status" : "approved"
} ],
"attributes" : [ ],
"consumerKey" : "XLotL3PRxNkUGXhGAFDPOr6fqtvAhuZe",
"consumerSecret" : "iNUyEaOOh96KR3YL",
"scopes" : [ ],
"status" : "approved"
} ],
"developerId" : "{myorg}@@@4Y4xd0KRZ1wmHJqu",
"lastModifiedAt" : 1349797216488,
"lastModifiedBy" : "admin@apigee.com",
"name" : "weatherapp",
"status" : "approved"
}
The same call today returns an error:
Sample request:
$ curl -u myname:mypass -X GET https://api.enterprise.apigee.com/v1/o/{myorg}/apps/weatherapp
{
"code" : "keymanagement.dao.InvalidAppId",
"message" : "Invalid app id weatherapp. App id must be a UUID.",
"contexts" : [ ]
}
A request to /apps/{appName} against the new API returns an app profile that contains an appID:
Sample request:
$ curl -u myname:mypass -X GET https://api.enterprise.apigee.com/v1/o/{myorg}/apps/d6dafdc5-4243-45b5-8a04-25acc42a0913
Sample response:
{
"accessType" : "read",
"apiProducts" : [ ],
"appFamily" : "default",
"appId" : "d6dafdc5-4243-45b5-8a04-25acc42a0913",
"attributes" : [ {
"name" : "Developer",
"value" : "asantos@apigee.com"
}, {
"name" : "DisplayName",
"value" : "jp1"
}, {
"name" : "Notes",
"value" : ""
}, {
"name" : "lastModifier",
"value" : ""
} ],
"callbackUrl" : "/",
"createdAt" : 1354207189119,
"createdBy" : "noreply_admin@apigee.com",
"credentials" : [ {
"apiProducts" : [ ],
"attributes" : [ ],
"consumerKey" : "SHREMFAJNek4q5c0cM0hJnHTE2oGIjqk",
"consumerSecret" : "BiazRXlenQ3i20mk",
"scopes" : [ ],
"status" : "approved"
} ],
"developerId" : "VtUTVAHKPSWHevWL",
"lastModifiedAt" : 1354207189119,
"lastModifiedBy" : "noreply_admin@apigee.com",
"name" : "jp1",
"scopes" : [ ],
"status" : "approved"
}
Developer Apps and Company Apps
You can continue to retrieve an app profile by name if you scope the request by developerEmail or companyName.
For example, the previous request:
Sample request:
$ curl -u myname:mypass -X GET htps://api.enterprise.apigee.com/v1/o/{myorg}/developers/ntesla@theramin.com/apps/weatherapp
Sample response:
{
"accessType" : "",
"appFamily" : "default",
"attributes" : [ ],
"callbackUrl" : "login.weatherapp.com",
"createdAt" : 1349797216488,
"createdBy" : "admin@apigee.com",
"credentials" : [ {
"apiProducts" : [ {
"apiproduct" : "weather_free",
"status" : "approved"
} ],
"attributes" : [ ],
"consumerKey" : "XLotL3PRxNkUGXhGAFDPOr6fqtvAhuZe",
"consumerSecret" : "iNUyEaOOh96KR3YL",
"scopes" : [ ],
"status" : "approved"
} ],
"developerId" : "{myorg}@@@4Y4xd0KRZ1wmHJqu",
"lastModifiedAt" : 1349797216488,
"lastModifiedBy" : "admin@apigee.com",
"name" : "weatherapp",
"status" : "approved"
}
The same request against the new API:
Sample request:
$ curl -u myname:mypass -X GET https://api.enterprise.apigee.com/v1/o/{myorg}/developers/ntesla@theramin.com/apps/weatherapp
Sample Response:
{
"accessType" : "read",
"apiProducts" : [ ],
"appFamily" : "default",
"appId" : "980790ce-8bbf-4457-a345-7ff8c56ada79",
"attributes" : [ ],
"callbackUrl" : "login.weatherapp.com",
"createdAt" : 1349797216488,
"createdBy" : "admin@apigee.com",
"credentials" : [ {
"apiProducts" : [ {
"apiproduct" : "weather_free",
"status" : "approved"
} ],
"attributes" : [ ],
"consumerKey" : "XLotL3PRxNkUGXhGAFDPOr6fqtvAhuZe",
"consumerSecret" : "iNUyEaOOh96KR3YL",
"scopes" : [ ],
"status" : "approved"
} ],
"developerId" : "{myorg}@@@4Y4xd0KRZ1wmHJqu",
"lastModifiedAt" : 1349797216488,
"lastModifiedBy" : "admin@apigee.com",
"name" : "weatherapp",
"status" : "approved"
}
The expand=true quary parameter continues to be supported. The previous API returned app details with no appID.
Sample request:
$ curl -u myname:mypass -X GET https://api.enterprise.apigee.com/v1/o/{myorg}/apps?"expand=true"
Sample response:
{
"app" : [ {
"accessType" : "",
"appFamily" : "default",
"attributes" : [ ],
"callbackUrl" : "login.weatherapp.com",
"createdAt" : 1349797216488,
"createdBy" : "rsaha@apigee.com",
"credentials" : [ {
"apiProducts" : [ {
"apiproduct" : "weather_free",
"status" : "approved"
} ],
"attributes" : [ ],
"consumerKey" : "XLotL3PRxNkUGXhGAFDPOr6fqtvAhuZe",
"consumerSecret" : "iNUyEaOOh96KR3YL",
"scopes" : [ ],
"status" : "approved"
} ],
"developerId" : "apigee-pm@@@4Y4xd0KRZ1wmHJqu",
"lastModifiedAt" : 1349797216488,
"lastModifiedBy" : "rsaha@apigee.com",
"name" : "weatherapp",
"status" : "approved"
}, {
"accessType" : "read",
"appFamily" : "default",
"attributes" : [ ],
"callbackUrl" : "login.myapp.com",
"createdAt" : 1354204157152,
"createdBy" : "rsaha@apigee.com",
"credentials" : [ {
"apiProducts" : [ {
"apiproduct" : "ApiKeySampleProduct",
"status" : "approved"
} ],
"attributes" : [ ],
"consumerKey" : "FbLtTbxQC3jhGlNFbeGI75fsfaVH4ZmQ",
"consumerSecret" : "IwpLk8xg8lX1AUxY",
"scopes" : [ ],
"status" : "approved"
} ],
"developerId" : "apigee-pm@@@jAvgq2abxyuMsyd0",
"lastModifiedAt" : 1354204157152,
"lastModifiedBy" : "rsaha@apigee.com",
"name" : "SampleApp",
"status" : "approved"
}, {
"accessType" : "read",
"appFamily" : "default",
"attributes" : [ {
"name" : "Language",
"value" : "java"
} ],
"callbackUrl" : "login.mytestapp.com",
"createdAt" : 1354208859275,
"createdBy" : "rsaha@apigee.com",
"credentials" : [ {
"apiProducts" : [ {
"apiproduct" : "ApiKeyValidationSample",
"status" : "approved"
} ],
"attributes" : [ ],
"consumerKey" : "e0XQGL3SjdJBJisUkhj97FdVXkGfqdPp",
"consumerSecret" : "CVaKGhyijpXccZ8K",
"scopes" : [ ],
"status" : "approved"
} ],
"developerId" : "apigee-pm@@@kAmSEh3fdApKZIpT",
"lastModifiedAt" : 1354208859275,
"lastModifiedBy" : "rsaha@apigee.com",
"name" : "MyTestApp",
"status" : "approved"
} ]
}
Without expand=true, this same call now returns an array of appIDs. With expand=true this call works as it did against the previous API, with the addition of appID, which is used for paginating results:
Sample request:
$ curl -u myname:mypass -X GET https://api.enterprise.apigee.com/v1/o/{myorg}/apps"?expand=true"
Sample response:
{
"app" : [ {
"accessType" : "read",
"apiProducts" : [ ],
"appFamily" : "default",
"appId" : "d6dafdc5-4243-45b5-8a04-25acc42a0913",
"attributes" : [ {
"name" : "Developer",
"value" : "asantos@apigee.com"
}, {
"name" : "DisplayName",
"value" : "jp1"
}, {
"name" : "Notes",
"value" : ""
}, {
"name" : "lastModifier",
"value" : ""
} ],
"callbackUrl" : "/",
"createdAt" : 1354207189119,
"createdBy" : "noreply_admin@apigee.com",
"credentials" : [ {
"apiProducts" : [ ],
"attributes" : [ ],
"consumerKey" : "SHREMFAJNek4q5c0cM0hJnHTE2oGIjqk",
"consumerSecret" : "BiazRXlenQ3i20mk",
"scopes" : [ ],
"status" : "approved"
} ],
"developerId" : "VtUTVAHKPSWHevWL",
"lastModifiedAt" : 1354207189119,
"lastModifiedBy" : "noreply_admin@apigee.com",
"name" : "jp1",
"scopes" : [ ],
"status" : "approved"
}, {
"accessType" : "read",
"apiProducts" : [ ],
"appFamily" : "default",
"appId" : "34f4eebc-3d54-4e5c-abd8-eb636007a015",
"attributes" : [ {
"name" : "Developer",
"value" : "selenium+dev13519243771@apigee.com"
}, {
"name" : "DisplayName",
"value" : "atimetwi13519243771"
}, {
"name" : "Notes",
"value" : "a callback url"
}, {
"name" : "lastModified",
"value" : "2012-11-03 07:12 AM"
}, {
"name" : "lastModifier",
"value" : "selenium@apigee.com"
}, {
"name" : "creationDate",
"value" : "2012-11-03 07:12 AM"
} ],
"callbackUrl" : "/acallbackurl",
"createdAt" : 1351926773838,
"createdBy" : "adminui@apigee.com",
"credentials" : [ {
"apiProducts" : [ {
"apiproduct" : "ptimetwi13519243771",
"status" : "pending"
} ],
"attributes" : [ ],
"consumerKey" : "S6NPzQBnyWOQkwECAv2YN64p09GcwMgk",
"consumerSecret" : "A3oB3A6dD3YNkkDW",
"scopes" : [ ],
"status" : "approved"
} ],
"developerId" : "AkgLSLGxGiDK9Qq6",
"lastModifiedAt" : 1351926773838,
"lastModifiedBy" : "adminui@apigee.com",
"name" : "1351926773683",
"scopes" : [ ],
"status" : "approved"
} ]
}
The following API calls remain unchanged:
/developers/{developerEmail}/apps/{appName}: GET
/developers/{developerEmail}/apps/{appName}: GET, POST, DELETE
/companies/{companyName}/apps: GET
/companies/{companyName}/apps/{appName}: GET, POST, DELETE
Impact on Policies
Access Entity Policy
The API change impacts only the Access Entity Policy. When configuring instances of the Access Entity Policy, you must use appID, rather than appName.
Please refer to Retrieve entity profiles using AccessEntity for usage.
If you have questions, post the to the Apigee Developer Forum.