Web Services Reference for Oracle Billing Insight > Examples of Web Services > Examples of the Hierarchy Web Service >
Example of Importing a Hierarchy
This example shows you how to use the analytics Web service to import a hiearchy. Operation
Use the following operation to Import a hierarchy: POST /hierarchy
Sample URL
The following is a sample URL for this Web service example: http://myhost.example.com:7017/rs/api/v2/hierarchies Sample JSON Input
The following is an example of the JSON input: { "importXML": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ListOfHierarchies xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"common-hierarchy-interchange-1.0.xsd\" ><CompleteHierarchy name=\"importHierarchy\" domainID=\"CUELLE\" type=\"BUSINESS\" displayName=\"importHierarchy\" ><Description><\/Description><RootNode><BusinessObject><Folder externalID=\"CUELLE_BusinessHier\" name=\"BusinessHier\" ><Description><\/Description><\/Folder><\/BusinessObject><ChildNodeList><Node><BusinessObject><Folder externalID=\"g1\" name=\"group1\" ><Description>group1<\/Description><\/Folder><\/BusinessObject><ChildNodeList><Node><BusinessObject><Folder externalID=\"g3\" name=\"group 3\" ><Description><\/Description><\/Folder><\/BusinessObject><\/Node><\/ChildNodeList><\/Node><Node><BusinessObject><Folder externalID=\"g2\" name=\"group2\" ><Description>group2<\/Description><\/Folder><\/BusinessObject><\/Node><\/ChildNodeList><\/RootNode><\/CompleteHierarchy><\/ListOfHierarchies>", "hierType": "BUSINESS", "startPeriod": "Feb-14", "endPeriod": "Apr-14" }
Sample JSON Response
The following is an example of the JSON response: Hierarchy imported successfully. Visit <link>http://myhost.example.com:7017rs/api/v2/hierarchies/182007</link>
|