In the API reference guide, did you look into "Populate Hierarchy" API under Hierarchy management section? Is it not sufficient or what you are looking for?
Hi - no, the documentation still references a CSV file but does not provide information on how that maps to the XML. As far as I know, you can't get XML to "read" a CSV file....so i'm looking for the specific format of the XML needed to contain the contents of the CSV file. For example, it might look like.
This is obviously just a guess - but it illustrates the level of documentation about the API that i'm looking for.
Currently we support only CSV file for Populate Hierarchy API. you need to give CSV file only as input.
Please let us know if you need more information.
This is exactly the problem. In prior version of the CBM the ability to import via CSV file was provided through the UI....it has now been removed. Documentation indicates use the API which is built on XML/XSD. So HOW do you import/use a CSV file with the API? the documentation doesn't give a clue other than provide the format of the CSV file which hasn't changed. If you have a code snippet that shows how the populate hierarchy api call can be used to import or read a CSV file - that will solve this issue.
Which client are you using to connect to the API ?. I used the apache http client and wrote a sample java program and i could able to populate the hierarchy from CSV file. you need the convert the given csv file to string format and send it in request. Please see below the code snippet.
//URL will be like https://10.112.58.103:443/vCenter-CB/api/hierarchy/41878/populate
PostMethod postMethod = new PostMethod(URL);
HttpClient client = new HttpClient();
FileReader fr = new FileReader("HierarchyCSV.csv");
BufferedReader br = new BufferedReader(fr);
StringBuffer sb = new StringBuffer();
The contents of the sample input CSV which i used is
2,CB-folder-1,1,101,vCenter Chargeback entity
Please let me know if you need more information.