A classic Global Manager system includes an API that can be used to request aggregated data from the stacks managed by the Global Manager system.
The Global Manager API supports the following resources:
- All resources that are available from the API on a regular appliance. However, the Global Manager API supports only GET requests on these resources. Resources for uploading and installing PowerPacks and system patches include Global Manager-specific options for viewing the differences between the version installed on Global Manager and the version installed on each stack.
- The /gm_stack resource, which can be used to request data about the stacks managed by a Global Manager system.
This
Use the following menu options to navigate the SL1 user interface:
- To view a pop-out list of menu options, click the menu icon (
).
- To view a page containing all of the menu options, click the Advanced menu icon (
).
Performing a GET Request to an API Resource
The following base URI can be used to access the API that responds with aggregated data:
<ip address or hostname of Global Manager>/gmapi
See
When you perform an API request to the aggregated API, the Global Manager system performs the appropriate API request to each entry point. However, the aggregated API does not return errors generated by the API on each entry point. If a request to one or more stacks or worker nodes is unsuccessful, the aggregated API will return a 206 (Partial Content) status code. The header information in X-Em7-Failed-Stacks specified the stacks that did not return data.
Aggregated data does not include data for devices that are monitored locally by the Global Manager system.
The response from the Global Manager API is the same as the API on a regular appliance. However, all ID values used by the Global Manager API are in the following format:
<device ID of entry point>_<id from entry point API>
Using the stack_diff Option
The following resource indexes support the stack_diff option. The stack_diff option is a boolean and requires that the extended_fetch option is set to 1. If stack_diff and extended_fetch is set to 1 in a request, the response will return the differences between the Global Manager system and the each stack:
- /filestore/powerpack
- /filestore/system_patch
- /powerpack
- /system_patch
- /system_patch_stage
- /system_patch_deploy_active
When the stach_diff option is set to 1 in a request, the response includes:
- An entry for each element of the specified type that exists on the Global Manager system that matches the filter criteria specified in the request. For example, when the stach_diff option is set to 1 in a request to the /system_patch resource, an entry is returned for each system patch that is registered on the Global Manager system.
- Each entry includes information about the element on the Global Manager system.
- Each entry includes a stack_diff section that includes a sub-entry for each stack. The entry for a stack includes information about that element on the stack that is different from the Global Manager system. For example, when the stach_diff option is set to 1 in a request to the /system_patch resource, the sub-entries for a stack shows the differences between each patch on the stack and the Global Manager system. If a patch has been installed on both the Global Manager system and a stack, the differences will typically be the register_date and last_status_date field.
- If a sub-entry for that stack is NULL, that element does not exist on the stack. For example, when the stach_diff option is set to 1 in a request to the /system_patch resource, a NULL sub-entry for a stack indicates that the patch has not been registered with that stack.
- If a sub-entry for that stack is empty, the element on that stack is the same as that element on the Global Manager system.
For example, suppose you want to compare the status of the 3Com Base Pack PowerPack on each stack to the version installed on the Global Manager system. You would perform a GET request to the following URI:
<Base URL of Global Manager>/gmapi/powerpack?limit=1&stack_diff=1&extended_fetch=1&hide_filterinfo=1&filter._id=3745057729A70EFF325F14382E4D9DB5
The request includes the following options:
- limit=1. Limit is a required option for the resource index.
- stack_diff=1. Enables output of differences between the Global Manager system and each stack.
- extended_fetch=1. This option is required when using the stack_diff=1 option.
- hide_filterinfo=1. Removes the filter information from the response.
- filter._id=3745057729A70EFF325F14382E4D9DB5. Filters the result to include only information about the 3COM Base Pack PowerPack, which has GUID "3745057729A70EFF325F14382E4D9DB5".
The response from a Global Manager system in XML format looks like this:
<powerpacks elemtype="assoc_list">
<powerpack key="/gmapi/powerpack/3745057729A70EFF325F14382E4D9DB5">
<ppid>/gmapi/powerpack/1</ppid>
<name>3Com Base Pack</name>
<version>1</version>
<date_create>1312473723</date_create>
<created_by>/gmapi/account/1</created_by>
<date_edit>1401484905</date_edit>
<edited_by>/gmapi/account/1</edited_by>
<release_notes>3Com Base Pack<br>Edited by: ScienceLogic, Inc.<br>...(full text removed from example)</release_notes>
<revision>342</revision>
<license_key>MJIbQgS1S5aDLrjyWdHNPvptzsfZ4sedlEa/PAUPVzG2pWAfgH82wIN6eKPY1csE30pvcwKB+mWKpR6qgVfRr6o=</license_key>
<publisher>ScienceLogic, Inc.</publisher>
<description/>
<vendors_supported/>
<models_supported/>
<versions_supported/>
<features/>
<technical_notes/>
<em7_min_version/>
<link name="filestore" URI="" description="Filestore Resource" elemtype="href"/>
<stack_diff elemtype="assoc_list">
<gm_stack key="/gmapi/gm_stack/40" elemtype="null"/>
<gm_stack key="/gmapi/gm_stack/41"/>
<gm_stack key="/gmapi/gm_stack/42">
<revision>343</revision>
</gm_stack>
</stack_diff>
</powerpack>
</powerpacks>
The response includes:
- One matching PowerPack, the 3Com Base Pack.
- All the attributes of the 3Com Base Pack on the Global Manager system.
- The stack_diff section, which includes an entry for each of the three stacks managed by this Global Manager system:
- The response returns a null value for stack ID 40. This indicates that the 3Com Base Pack is not installed on this stack.
- The response returns an empty value for stack ID 41. This indicates that the 3Com Base Pack on the stack is the same as the 3Com Base Pack on the Global Manager system.
- The response returns one attribute (revision) for the PowerPack for sack ID 42. This indicates that the revision attribute of the 3Com Base Pack on the stack is different from the revision attribute of the 3Com Base Pack on the Global Manager system.
The /gm_stack Resource
The /gm_stack resource can be used to request data about the stacks managed by a Global Manager system. The following actions are supported by the /gm_stack resource:
Action | URI | Method |
---|---|---|
View/search/filter the list of stacks. | /gm_stack | GET |
View the properties of a stack. | /gm_stack/<stack id> | GET |