Management Zones
ucmdb_rest.management_zone.ManagementZones(server)
Initialize the service with a reference to the main level UCMDB server
Source code in ucmdb_rest\management_zone.py
activateZone(zone_id)
Activates a management zone on the UCMDB server.
This method makes a PATCH request to the UCMDB server to activate a specific management zone.
Parameters:
zone_id : str The ID of the management zone to activate.
Returns:
requests.Response Response object confirming the activation of the management zone.
Source code in ucmdb_rest\management_zone.py
createManagementZone(mgmtZone)
Creates a new management zone on the UCMDB server.
This method makes a POST request to the UCMDB server to create a new management zone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mgmtZone
|
dict
|
Dictionary containing the details of the management zone to be created. Example: { "name": "Zone Via REST-API", "activated": False, "ipRangeProfiles": [ { "ipRangeProfileId": "All IP Range Groups" } ], "discoveryActivities": [ { "discoveryProfileId": "Added Thru REST-API", "scheduleProfileId": "Interval 1 Day (Default)", "credentialProfileId": "All Credentials" } ] } |
required |
Returns:
| Type | Description |
|---|---|
Response
|
Response object confirming the creation of the management zone. |
Source code in ucmdb_rest\management_zone.py
deleteManagementZone(zone_id)
Deletes a management zone from the UCMDB server.
This method makes a DELETE request to the UCMDB server to delete a specific management zone.
Parameters:
zone_id : str The ID of the management zone to delete.
Returns:
requests.Response Response object confirming the deletion of the management zone.
Source code in ucmdb_rest\management_zone.py
getMgmtZone()
Retrieves management zone details from the UCMDB server.
This method makes a GET request to the UCMDB server to retrieve management zone details.
Returns:
requests.Response The response contains a dictionary of items, the items are a list of dictionaries including: - name : String - The name of the management zone - activated : Boolean - Is the zone active? - ipRangeProfiles : A list of dictionaries containing the id - discoveryActivities : A list of dictionaries with: - discoveryProfileId : String - Name of the acitivity - scheduleProfileId : String - Name of the interval - credentialProfileId : String - Name of the credentials - id : String - Zone name - description : String - Description of the discovery - triggerSummary : Dictionary - A list of trigger statuses
Source code in ucmdb_rest\management_zone.py
getSpecificMgmtZone(zone_id)
Retrieves a specific management zone from the UCMDB server.
This method makes a GET request to the UCMDB server to retrieve a specific management zone.
Parameters:
zone_id : str The ID of the management zone to retrieve.
Returns:
requests.Response The return is a list of dictionaries with a single entry, 'items' Items contains a list of dictionaries - name : str - Activated: bool - IP Range Profiles: list of dicts - Discovery Activities: list of dicts - Discovery Profile: str - Schedule Profile: str - Credential Profile: str - ID: str - Trigger Summary: dict - Total Count: int - Pending Count: int - In Progress Count: int - Success Count: int - Warning Count: int - Error Count: int - Result CI Count: int - Active Jobs: dict - ASMish: list of str
Source code in ucmdb_rest\management_zone.py
getStatisticsForZone(zone_id)
Retrieves real-time discovery statistics for a specific management zone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
zone_id
|
str
|
The unique ID or Name of the management zone. |
required |
Returns:
| Type | Description |
|---|---|
Response
|
Contains trigger summaries (Success, Warning, Error, In Progress) and the total count of discovered CIs. |