Requisitions
RESTful service to the Horizon Provisioning Requisitions. In this API, these "groups" of nodes are aptly named and treated as requisitions.
The current implementation supports CRUD operations for managing provisioning requisitions. Requisitions are first POSTed, and no provisioning (import or synchronize) operations are taken. This is done so that the XML can be verified and the operations can happen at a later time. They are moved to the deployed state (put in the active requisition repository) when an import is run.
If a request says that it gets the active requisition, that means it returns the pending requisition (being edited for deployment) if there is one, otherwise it returns the deployed requisition. Note that anything that says it adds, deletes, or modifies a node, interface, or another element in these instructions is referring to modifying that element from the requisition, not from the database itself. That will happen upon import or synchronization.
You may write requisition data if the authenticated user is assigned the provision, rest, or admin roles.
GETs
GET requests read data from the requisition repositories. The following table describes GET requests and how they are formatted:
Resource | Description |
---|---|
|
Get all active requisitions. |
|
Get the number of undeployed requisitions. Returns plaintext rather than XML or JSON. |
|
Get a list of all deployed (active) requisitions. |
|
Get the number of deployed requisitions. Returns plaintext rather than XML or JSON. |
|
Get the active requisition for the given foreign source name. |
|
Get the list of nodes being requisitioned for the given foreign source name. |
|
Get the node with the given foreign ID for the given foreign source name. |
|
Get the interfaces for the node with the given foreign ID and foreign source name. |
|
Get the interface with the given IP for the node with the specified foreign ID and foreign source name. |
|
Get the services for the interface with the specified IP address, foreign ID, and foreign source name. |
|
Get the given service with the specified IP address, foreign ID, and foreign source name. |
|
Get the categories for the node with the given foreign ID and foreign source name. |
|
Get the category with the given name for the node with the specified foreign ID and foreign source name. |
|
Get the assets for the node with the given foreign ID and foreign source name. |
|
Get the value of the asset for the given assetName for the node with the given foreign ID and foreign source name. |
POSTs
POST requests add data to and update data existing in the requisition repositories.
POST requests expect JSON- or XML-formatted data. |
The following table describes POST requests and how they are formatted:
Resource | Description |
---|---|
|
Adds or replaces a requisition. |
|
Adds or replaces a node in the specified requisition. This operation can be very helpful when working with large requisitions. |
|
Adds or replaces an interface for the given node in the specified requisition. |
|
Adds or replaces a service on the given interface in the specified requisition. |
|
Adds or replaces a category for the given node in the specified requisition. |
|
Adds or replaces an asset for the given node in the specified requisition. |
PUTs (modifying data)
PUT requests modify data in the requisition repositories.
PUT requests expect form-urlencoded data.
|
The following table describes PUT requests and how they are formatted:
Resource | Description |
---|---|
|
Performs an import or synchronize on the specified requisition. This turns the "active" requisition into a "deployed" requisition. |
|
Performs an import or synchronize on the specified requisition, if it is newly added or removed. Existing nodes are not scanned until the next rescan interval. This request type is useful when applying changes to a subset of nodes in a requisition. |
|
Update the specified requisition. |
|
Update the specified node for the given requisition. |
|
Update the specified IP address for the given node and requisition. |
DELETEs (removing data)
DELETE requests remove data from the requisition repositories. The following table describes DELETE requests and how they are formatted:
Resource | Description |
---|---|
|
Delete the pending requisition for the named foreign source. |
|
Delete the active requisition for the named foreign source. |
|
Delete the node with the given foreign ID from the given requisition. |
|
Delete the IP address from the requisitioned node with the given foreign ID. |
|
Delete the service from the requisitioned interface with the given IP address and foreign ID. |
|
Delete the category from the node with the given foreign ID. |
|
Delete the field from the node’s assets with the given foreign ID and asset name. |