Table 13. API Resources for Hierarchies
|
|
|
|
GET |
/hierarchies |
hierarchyType: {BILLING, or BUSINESS} |
Returns a list of all hierarchies that the current user can access, including IDs and names. |
POST |
/hierarchies |
None |
Creates a new hierarchy with the type specified in the payload; hierarchyType: {BILLING, BUSINESS, or a custom value}. |
POST |
/hierarchies |
None |
Copies a hierarchy, using the original hierarchy type. The payload includes an existing hierarchyId. The hierType element is ignored. |
POST |
/hierarchies |
None |
Imports a hierarchy from an XML payload, using the type defined in importXML. Uses the importXML, startPeriod, and endPeriod elements. The payload does not include hierarchyId. The importXML element must be in a single line. Do not include "\n". in JSON format, all double quotes (") must be preceded with a slash, as in \". In XML format, the importXML string must be placed inside <![CDATA[ ... ]]>). The hierType element is ignored. |
GET |
/hierarchies/{hierarchyId} |
None |
Returns information about a particular hierarchy. |
PUT |
/hierarchies/{hierarchyId} |
None |
Updates a hierarchy's information, including expire. |
DELETE |
/hierarchies/{hierarchyId} |
None |
Deletes a hierarchy. |
GET |
/hierarchies/{hierarchyId}/myRootNodes |
period |
Returns the list of root nodes of the hierarchy that the current user can access, for the latest period. You can optionally specify a different period. |
GET |
/hierarchies/{hierarchyId}/linkTargetTypes |
None |
Returns a list of valid link target types for a hierarchy. |
GET |
/hierarchies/{hierarchyId}}/nodes/{nodeId}/children |
period |
Returns a list of children nodes for a particular node with node index, for the latest period. |
GET |
/hierarchies/{hierarchyId}/nodes/{nodeId}/linkTargets |
period; linkTargetType: {account,serviceAgreement, group, company, custom type} |
Returns a list of link target objects under a particular node within the hierarchy, for the latest period. |
POST |
/hierarchies/{hierarchyId}/nodes/{nodeId}/linkTargets |
nodeName; linkTargetType; linkTargetURI; linkTargetExternalKey |
Adds a linkTarget object to a node as a child node. |
GET |
/hierarchies/{hierarchyId}/linkTargets/{linkTargetURI} |
period |
Returns the node that represent a particular linktarget URI, for the latest period. |
DELETE |
/hierarchies/{hierarchyId}/linkTargets/{linkTargetURI} |
period |
Removes a particular linkTarget from the hierarchy, for the latest period. |
DELETE |
/hierarchies/{hierarchyId}/nodes/{nodeId} |
period |
Deletes the node and its child node from a heirarchy, for the latest period. |
GET |
/hierarchies/{hierarchyId}/nodes/{nodeId}/users |
status:{"assigned","unassigned", "authorized", "unauthorized"} |
Returns a list of users assigned to this node. If no status is specified, the default is assigned. |
POST |
/hierarchies/{hierarchyId}/nodes/{nodeId}/users |
None |
Assigns a user to a node with userid in the payload. |
DELETE |
/hierarchies/{hierarchyId}/nodes/{nodeId}/users/{userId} |
None |
Removes an assigned user from the node. |
GET |
/hierarchies/{hierarchyId}/periods |
None |
Returns a list of available periods for a hierarchy. |
POST |
/hierarchies/{hierarchyId}/periods |
startPeriod, endPeriod |
Publishes a hierarchy for specific periods. |