BSS API CPBM
Hi Yesid,
Please find the documentation to generate signtature at: http://support.citrix.com/proddocs/topic/cpbm-22-map/cpbm-generatingsigntre-task.html
Thanks,
Manish
Hello, I need use the API to CPBM, the version is 2.2.1 and I see the information
http://support.citrix.com/proddocs/topic/cpbm-21-map/cpbm-21-bssapi-wrapper-con.html
http://shapeblue.com/citrix/working-with-the-citrix-cloudportal-business-manager-2-1-bss-api/
but not understand How generate the signature, please help me? is necesary create a script?? or for URL generate the signature??
thanks
Hi Yesid,
Please find the documentation to generate signtature at: http://support.citrix.com/proddocs/topic/cpbm-22-map/cpbm-generatingsigntre-task.html
Thanks,
Manish
Hi Yesid,
Sample java code to create the API URL is as bellow:
String apiKey = "api.key";// user's API key
String secretKey = "secret.key"; //user's secret key
String urlString = "endpoint.url"; // example: http://myhost/portal/api
String pathString = "api.url"; // example: /account/events?pagesize=1&category=ACCOUNT&source=PORTAL
String paramString = (pathString.indexOf("?") > -1 && pathString.indexOf("?") < pathString.length() - 1) ? pathString
.split("\\?")[1] : null;
String barePathString = pathString.indexOf("?") > -1 ? pathString.split("\\?")[0] : pathString;
List<String> paramList = new ArrayList<String>();
if (paramString != null && !paramString.equals("")) {
paramList.addAll(Arrays.asList(paramString.split("&")));
}
paramList.add("apiKey=" + apiKey);
Collections.sort(paramList);
String timeStamp = "" + System.currentTimeMillis();
String parameterString = "_=" + timeStamp;
for (String str : paramList) {
if (str != null && !"".equals(str)) {
parameterString = parameterString + "&" + str;
}
}
return urlString + barePathString + "?"+ parameterString + "&signature="
+ signRequest((barePathString + parameterString.toLowerCase()), secretKey);
This will require the sample method "signRequest" as provided in the API documentation at http://support.citrix.com/proddocs/topic/cpbm-23-map/cpbm-generatingsigntre-task.html.
Please note that above is just a sample code and may require some change in order to work properly. And Citrix is not responsible for any mistake in above code.
Thanks,
Manish
Ask, Discuss, Answer