Rest API – ESB Transports
Overview
The REST API allows you to work with Enterprise Service Bus (ESB) Transports in FireScope SPM using a REST client in lieu of the SPM user interface.
- Retrieve
- Schema
- Create or Update
- Delete
Retrieve
To retrieve the current information about a ESB Transport in SPM, send unique query parameters in a GET request to the following URL:
http://localhost:38050/web_services/...dge1&name=ESB1
Note: Don’t forget to change the domain name (localhost) and query parameter values (account, edge_device, and name) to match your environment and data.
A JSON response will be returned similar in structure to the payload for creation.
Query Parameter Descriptions
Parameter | Description | Type | Required |
account | Name of the SPM Account. | String | Yes |
edge_device | Name of the ESB Transport’s Edge Device. | String | Yes |
name | Name of the ESB Transport. | String | Yes |
Schema
To retrieve the full SPM schema for ESB Transport, send the Account name with the schema parameter set to true in a GET request to the following URL:
http://[SPM IP address]:38050/web_services/esb_transport?account=[Account name]&schema=true
Create or Update
To create or update an ESB Transport, POST a JSON document with the specific ESB Transport information to the following URL:
http://[SPM IP address]:38050/web_services/esb_transport
You can use the following example as a guide, but note that it does not include all optional properties.
{
"account_id" : "firescope",
"edge_device_id" : "edge1",
"name" : "esb1",
"esb_transport_group" : [ "group1" ],
"esb_transport_attribute" : [{
"name" : "quantity",
"multiplier" : "1",
"value_type" : 3
}],
"esb_transport_client_ci" : [{
"ciid" : {"ci" : "ci1"},
"client_ci_uid" : "10.0.0.10"
}],
"esb_transport_type" : {
"dbname" : "cmdb",
"dbtype" : 1,
"ip" : "10.0.0.1",
"password" : "secret",
"port" : 3306,
"query" : "select ip, quantity from orders limit 5;",
"username" : "dbuser",
"unique_col" : "ip",
"use_ciname" : false
}
}
Property Descriptions
The following table provides information about all required and optional properties available for an ESB Transport.
Property | Description | Type | Default Value | Required |
account_id | Name of the SPM Account. | String | Yes | |
edge_device_id | Name of the Edge Device that will process this ESB Transport. | String | Yes | |
name | Name of the ESB Transport. | String | Yes | |
ciid | The CI blueprint internally created by and managed by this ESB Transport. Read only. | String | No | |
delay | Defines how often in seconds FireScope should poll this data source for new data. | Number | 60 | Yes |
description | An optional description of this ESB. | String | No | |
errormsg | Read only field populated with any error that may occur in trying to collect the ESB data. | String | No | |
esb_transport_attribute | A List of attributes that need to be created. PropertyDescriptionTypeDefault ValueRequireddeltaOption to either collect the raw value or its rate of change over time.0 = As Is1 = Speed per Second2 = Simple ChangeNumber0YesmultiplierUsed to multiply the collected value to convert it into a more useful form (e.g. 1024 to convert bytes into kilobytes).String”1″YesnameThe attribute name. This should match a column name from the query.String YesunitsUnit type appended to the end of all values for this Attribute whenever they are displayed.String Novalue_typeThe underlying data type of the value being collected.0 = Float1 = String2 = Log3 = Long4 = Text9 = JSON |
Object[] | Yes | |
esb_transport_client_ci | Contains a list of mappings of external IDs to Configuration Items. Required if use_ciname is false. PropertyDescriptionTypeDefault ValueRequiredciidThe CI to map to.Object Yesclient_ci_uidThe expected value from the unique_col field returned from the query that can be used to map it to the CI.String Yes |
Object[] | Conditional | |
esb_transport_group | Associate this ESB Transport with existing ESB Transport Groups. Transport Groups are logical containers for your ESB transports, which make them easier to find and manage. | String[] | No | |
esb_transport_type | Describes the particular transport type being used by this ESB. Since only JDBC transport is supported via REST, this provides the database connection information. PropertyDescriptionTypeDefault ValueRequireddbnameThe database name to query.String YesdbschemaThe database schemaString NodbtypeThe type of database to connect to:1 = MYSQL2 = ORACLE3 = MSSQL4 = SYBASE5 = DB2Number1YesipThe IP or hostname the database is running on.String Yesntm_domain String NopasswordThe password of the user connecting to the database. This will be encrypted before being saved.String YesportThe database port to use.Number YesqueryThe database query to run on the remote database.String Yesunique_colThe unique column from the query that can be used to identify rows and map them to CIs.String YesusernameThe database userString Yesuse_cinameIf set to false, automatically links the blueprint created by the ESB to all the CIs identified in the esb_transport_client_ci mappings. Additionally, the unique_col will be used to lookup which CI the collected attribute belongs to.If set to true, the client will have to manually apply the ESB created blueprint to the CI’s it wants to generate attributes for. It is assumed that the unique_col will already contain the correct CI name to map to.BooleanFALSEYes |
Object | Yes | |
rows_processed | Read only field with the results of the query processed. | Number | 0 | No |
rows_retrieved | Read only field with the number of rows retrieved by the query. | Number | 0 | No |
status | Whether the ESB Transport is enabled or not.0 = DISABLED1 = ENABLED | Number | 1 | Yes |
Delete
To delete an ESB Transport, send an HTTP DELETE request with the same query parameters as the GET request. See the Retrieve for the URL format and query parameter descriptions.