API Guide
Table Of Contents
- Active System Manager Release 8.2 API Reference Guide
- Overview
- Resource URI Endpoints
- Authentication Headers
- Generic Query Parameters
- HTTP Message Bodies
- Usage Examples
- Exception Handling
- Appendix A - API Reference
- /Authenticate/
- /Chassis/
- /Chassis/{refId}
- /Chassis/{refId}
- /Chassis/{refId}
- /Chassis/iom/ip/{ip}
- /Chassis/{refId}/sensorlog
- /Chassis/{refId}/sensorlog
- /Chassis/{serviceTag}/{type}
- /Chassis/{serviceTag}/{type}
- /Credential/
- /Credential/
- /Credential/{id}
- /Credential/{id}
- /Credential/{id}
- /DHCP/
- /DHCP/
- /Deployment/
- /Deployment/
- /Deployment/{id}
- /Deployment/{id}
- /Deployment/{id}
- /Deployment/export/csv
- /Deployment/defineService
- /Deployment/defineServiceDiff
- /Deployment/device/{deviceId}
- /Deployment/filter/{numOfDeployments}
- /Deployment/migrate/{serviceId}/{serverId}
- /Deployment/migrateServer/{serviceId}/{componentId}
- /Deployment/serverNetworking/{serviceId}/{serverId}
- /DeviceGroup/
- /DeviceGroup/
- /DeviceGroup/{refId}
- /DeviceGroup/{refId}
- /DeviceGroup/{refId}
- /DiscoveryRequest/
- /DiscoveryRequest/
- /DiscoveryRequest/{id}
- /DiscoveryRequest/{id}
- /DiscoveryRequest/chassislist
- /DiscoveryRequest/discoveryresult/{id}
- /FirmwareRepository/
- /FirmwareRepository/
- /FirmwareRepository/{id}
- /FirmwareRepository/{id}
- /FirmwareRepository/connection
- /FirmwareRepository/compliance
- /FirmwareRepository/compliance/{id}
- /FirmwareRepository/softwarecomponent
- /FirmwareRepository/softwarebundle/{id}
- /ManagedDevice/
- /ManagedDevice/
- /ManagedDevice/count
- /ManagedDevice/{refId}
- /ManagedDevice/{refId}
- /ManagedDevice/{refId}
- /ManagedDevice/firmware
- /ManagedDevice/export/csv
- /ManagedDevice/withcompliance
- /ManagedDevice/puppet/{certName}
- /ManagedDevice/puppet/{certName}
- /ManagedDevice/withcompliance/{refId}
- /NTP/
- /NTP/
- /NTP/
- /Network/
- /Network/
- /Network/export/csv
- /Network/{networkId}
- /Network/{networkId}
- /Network/{networkId}
- /Network/ipAddress/assign
- /Network/ipAddress/release
- /Network/{networkId}/usageids
- /Network/{networkId}/ipaddresses
- /OSRepository/
- /OSRepository/
- /OSRepository/{id}
- /OSRepository/{id}
- /OSRepository/{id}
- /OSRepository/sync/{id}
- /OSRepository/connection
- /Proxy/
- /Proxy/
- /Proxy/test
- /Server/
- /Server/count
- /Server/{refId}
- /Server/{refId}
- /Server/serviceTag/{serviceTag}
- /ServiceTemplate/
- /ServiceTemplate/
- /ServiceTemplate/{id}
- /ServiceTemplate/{id}
- /ServiceTemplate/{id}
- /ServiceTemplate/upload
- /ServiceTemplate/export
- /ServiceTemplate/{id}/copy
- /ServiceTemplate/export/csv
- /ServiceTemplate/uploadConfig
- /ServiceTemplate/updateParameters
- /ServiceTemplate/device/{deviceId}
- /ServiceTemplate/{id}/mapToPhysicalResources
- /ServiceTemplate/components/service/{serviceId}
- /ServiceTemplate/components/template/{templateId}
- /ServiceTemplate/service/{serviceId}/{componentType}
- /ServiceTemplate/template/{templateId}/{componentType}
- /Timezone/
- /Timezone/
- /Timezone/all
- /User/
- /User/
- /User/{userId}
- /User/{userId}
- /User/{userId}
- /WizardStatus/
- /WizardStatus/
- Appendix B - Model Reference
- BrownfieldStatus
- ComparatorValue
- CompliantState
- DeploymentHealthStatusType
- DeploymentStatusType
- DeviceHealth
- DeviceState
- DeviceType
- DiscoverDeviceType
- DiscoveryStatus
- DiskMediaType
- Health
- HotSpareStatus
- IOMLocationType
- IdentityType
- LogSeverity
- MediaType
- NetworkMode
- PhysicalType
- RepositoryState
- RepositoryStatus
- ServerSlotType
- ServiceTemplateComponentSubType
- ServiceTemplateComponentType
- ServiceTemplateSettingType
- UIRaidLevel
- UpdateType
- AsmDetailedMessage
- AuthenticateRequest
- AuthenticateResponse
- ChassisController
- ChassisPowerSupply
- Enclosure
- FirmwareInventory
- GroupUser
- IKVM
- IpAddress
- IpRange
- Link
- List
- MemoryInventory
- OSRepository
- ProcessorInventory
- RejectedServer
- SelectedNIC
- ServerJobStatus
- ServiceTemplateOption
- ServiceTemplateUploadRequest
- SoftwareComponent
- timeZone
- UsageIdList
- VM
- connected_switch
- dhcpSettings
- fc_interface
- logEntry
- ntpSettings
- proxySettings
- references
- testProxyResponse
- timeZone
- AsmDetailedMessageList
- DeploymentDevice
- DeviceDiscoveryRequest
- FirmwareComplianceComponents
- FirmwareUpdateRequest
- GregorianCalendar
- GroupUserList
- IOM
- LogicalNetworkIdentityInventory
- PhysicalDisk
- Server
- ServiceTemplateValid
- SoftwareBundle
- StaticNetworkConfiguration
- VirtualDiskConfiguration
- availableTimeZones
- credential
- wizardStatus
- Chassis
- ChassisLogEntry
- DeviceDiscoveryRequests
- LogicalNetworkInterface
- Network
- User
- VirtualDisk
- asmCredential
- Controller
- Partition
- RAIDConfiguration
- credentialList
- Interface
- SelectedServer
- DeploymentFilterResponse
- Fabric
- NetworkConfiguration
- ServerNetworkObjects
- ServiceTemplateSetting
- ServiceTemplateCategory
- component
- FirmwareRepository
- ServiceTemplate
- Deployment
- DiscoveredDevices
- DiscoveryResult
- FirmwareDeviceInventory
- DiscoveryRequest
- ManagedDevice
- ManagedDeviceList
- DeviceGroup
- DeviceGroupList
- Appendix C -Ruby Code Usage

7
Exception Handling
When an HTTP error code is returned the response payload will contain information about the error that
occurred. For the purpose of illustration the following exception response was intentionally generated by
trying to get a ServiceTemplate with an id that doesn't exist. In this case the HTTP response was 404 and
the XML response is below. See the API reference section for the relevant HTTP responses that may be
returned by each REST endpoint.
The example code used to catch this exception and report the error is below.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AsmDetailedMessageList>
<Messages>
<messages>
<messageBundle>AsmManagerMessages</messageBundle>
<messageCode>ASM0042</messageCode>
<severity>ERROR</severity>
<category>USER_FACING</category>
<displayMessage>Unable to find the Template Id: ABC.</displayMessage>
<responseAction>Make sure that a correct Template Id is entered and retry
the operation. Template Ids are case sensitive. Verify the list of devices
under the Summary tab to make sure whether or not the Template already exists.</
responseAction>
<detailedMessage>The Template Id cannot be found.</detailedMessage>
<agentId>ASM Manager</agentId>
<timeStamp>2015-03-10T14:34:24.866Z</timeStamp>
<sequenceNumber>0</sequenceNumber>
</messages>
</Messages>
</AsmDetailedMessageList>
require 'ASMConfig'
templateId = "ABC" // bogus id
url = ASM::API::URI("/ServiceTemplate/%s"%templateId)
begin
response = ASM::API::sign {
RestClient.get url
}
rescue RestClient::Exception => e
print "Got exception with status: %d\n" % e.response.code
print "%s\n" % e.response
end
26