Writer instructions | |
---|---|
Page title | For most spaces, this page must be titled Space announcements. For spaces with localized content, this page must be titled Space announcements l10n. |
Purpose | Provide an announcement banner on every page of your space. |
Location | Move this page outside of your home branch. |
Guidelines |
Namespace "admin"
The "admin" namespace allows you to programmatically manipulate core objects that define your instance of MainView Middleware Administrator. Creating, reading, modifying and deleting projects, users, groups, filters, and connection definitions (both TIBCO EMS and IBM WebSphere MQ) are part of this namespace.
To use the JavaScript API, you must instantiate an instance of bmm/admin/Admin, specifying the base url of the server to which you want to connect. You then invoke methods on the admin object to perform the operations. Here is an example:
"bmm/admin/Admin"
], function(Admin) {
var admin = new Admin("https://localhost:8443/bmmadmin");
admin.login("admin", "admin");
admin.logout();
admin.close();
});
All main Admin classes can take the base url and provide the login(), logout(), and close() methods. The signatures for these methods are:
login(username, password)
logout()
close()
Project Operations
Get Project
REST
GET /admin/projects/[name]
JavaScript
getProject(name)
Parameters
name – A string representing the name of the project
Returns
A JavaScript object representing the named project
Get Projects
REST
GET /admin/projects/
JavaScript
getProjects()
Parameters
None
Returns
A JavaScript array containing short project definitions (name and description)
Create Project
REST
POST o to /admin/projects/
JavaScript
createProject(o)
Parameters
A JavaScript object representing the project
Returns
None
Modify Project
REST
PUT o to /admin/projects/[name]
JavaScript
modifyProject(o, name)
Parameters
o – A JavaScript object representing the project
name – A string representing the name of the project
Returns
None
Delete Project
REST
DELETE /admin/projects/[name]
JavaScript
deleteProject(name)
Parameters
name – A string representing the name of the project
Returns
None
JSON data format
Project
Field | Description |
---|---|
name | The name of the project |
description | The description for the project |
connections | An array of connections and their filters associated with the project. The data format for each connection is described in "Project Connection Reference" |
users | An array of user references and their permissions within the project as described in "Project User Reference" |
groups | An array of group references and their permissions within the project as described in "Project Group Reference" |
links | An array of link definitions as described in "Project Links" |
Project Connection Reference
Field | Description |
---|---|
namespace | The namespace for the connection definition (e.g. 'wmq' or 'ems') |
name | The name of the connection |
filters | An array of filter references to be applied to the connection within the project |
Filter Reference
Field | Description |
---|---|
name | The name of the filter |
namespace | The namespace to which the filter belongs (e.g. 'wmq' or 'ems') |
Project User Reference
Field | Description |
---|---|
user | The username of a user that is given rights to this project |
permissions | An array of strings specifying the permissions for the user. Valid permissions are "INQUIRE", "DELETE", "READ", "WRITE", "OPERATOR", "ADMINISTRATION" |
Project Group Reference
Field | Description |
---|---|
group | The name of a group that is given rights to this project |
permissions | An array of strings specifying the permissions for the user. Valid permissions are "INQUIRE", "DELETE", "READ", "WRITE", "OPERATOR", "ADMINISTRATION" |
Project Link Reference
Field | Description |
---|---|
name | The name to be given to the link |
url | The url for the link |
User Operations
Get User
REST
GET /admin/users/[name]
JavaScript
getUser(name)
Parameters
name – A string representing the name of the user
Returns
A JavaScript object representing the named user
Get Users
REST
GET /admin/users/
JavaScript
getUsers()
Parameters
None
Returns
A JavaScript array containing user definitions
Create User
REST
POST o to /admin/users/
JavaScript
createUser(o)
Parameters
o – A JavaScript object representing the user
Returns
None
Modify User
REST
PUT o to /admin/users/[name]
JavaScript
modifyUser(o, name)
Parameters
o – A JavaScript object representing the user
name – A string representing the name of the user
Returns
None
Delete User
REST
DELETE /admin/users/[name]
JavaScript
deleteUser(name)
Parameters
name – A string representing the name of the user
Returns
None
JSON data format
Field | Description |
---|---|
username | The username that identifies the user |
enabled | Specifies whether the user is allowed to login or not. Valid values are "true" or "false" (note, boolean, so don't quote). |
Fullname | The full name of the user |
The email address of the user | |
password | The password of the user. For read operations, this will be cryptographically hashed. |
Set_password | When setting a password, this must be boolean true and the password specified in clear text. |
Group Operations
Get Group
REST
GET /admin/groups/[name]
JavaScript
getGroup(name)
Parameters
name – A string representing the name of the group
Returns
A JavaScript object representing the named group
Get Groups
REST
GET /admin/groups/
JavaScript
getGroups()
Parameters
None
Returns
A JavaScript array containing group definitions
Create Group
REST
POST o to /admin/groups/
JavaScript
createGroup(o)
Parameters
o – A JavaScript object representing the group
Returns
None
Modify Group
REST
PUT o to /admin/group/[name]
JavaScript
modifyGroup(o, name)
Parameters
o – A JavaScript object representing the group
name – A string representing the name of the group
Returns
None
Delete Group
REST
DELETE /admin/groups/[name]
JavaScript
deleteGroup(name)
Parameters
name – A string representing the name of the group
Returns
None
JSON data format
Field | Description |
---|---|
name | The name of the group |
descr | The description of the group |
members | An array of usernames who are members of the group |
Filter Operations
Get Filter
REST
GET /admin/filters/[name]
JavaScript
getFilter(name)
Parameters
name – A string representing the name of the filter
Returns
A JavaScript object representing the named filter
Get Filters
REST
GET /admin/filters/
JavaScript
getFilters()
Parameters
None
Returns
A JavaScript array containing filter definitions
Create Filter
REST
POST o to /admin/filters/
JavaScript
createFilter(o)
Parameters
o – A JavaScript object representing the filter
Returns
None
Modify Filter
REST
PUT o to /admin/filter/[name]
JavaScript
modifyFilter(o, name)
Parameters
o – A JavaScript object representing the filter
name – A string representing the name of the filter
Returns
None
Delete Filter
REST
DELETE /admin/filters/[name]
JavaScript
deleteFilter(name)
Parameters
name – A string representing the name of the filter
Returns
None
JSON data format
Field | Description |
---|---|
name | The name of the filter |
type | A string representing the type of filter. "WILDCARD_FILTER" and "LOGICALEX_FILTER" are the valid types. |
Namespace | The namespace to which the obj_type belongs (e.g. 'wmq' or 'ems') |
filter_expr | The filter expression |
obj_type | The type of object to which the filter applies. The valid types are "Queue", "Channel", "Process", "Subscription", "Topic", "Listener", "Namelist", "Service", "Authinfo" |
WMQConnection Operations
Get WMQConnection
REST
GET /wmq/connections/[name]
JavaScript
getWMQConnection(name)
Parameters
name – A string representing the name of the connection
Returns
A JavaScript object representing the named connection
Get WMQConnections
REST
GET /wmq/connections/
JavaScript
getWMQConnections()
Parameters
None
Returns
A JavaScript array containing connection definitions
Create WMQConnection
REST
POST o to /wmq/connections/
JavaScript
createWMQConnection(o)
Parameters
o – A JavaScript object representing the connection
Returns
None
Modify WMQConnection
REST
PUT o to /wmq/connections/[name]
JavaScript
modifyWMQConnection(o, name)
Parameters
o – A JavaScript object representing the connection
name – A string representing the name of the connection
Returns
None
Delete WMQConnection
REST
DELETE /wmq/connections/[name]
JavaScript
deleteWMQConnection(name)
Parameters
name – A string representing the name of the connection
Returns
None
JSON data format
Field | Description |
---|---|
name | The name of the connection |
qmgr | The name of the queue manager for this connection |
host | The host where the queue manager resides |
port | The port used to connect to the queue manager on the host where the queue manager resides |
channel | The name of a WebSphere MQ server connection channel to use to connect to the queue manager |
sslenabled | Specifies whether SSL is required for this connection. If unspecified, false is assumed. |
Ciphersuite | The cipher suite to use when using SSL |
proxyenabled | Whether this queue manager is accessed via a queue manager proxy. If unspecified, false is assumed. |
Qmgrproxy | The queue manager proxy to use if proxying |
securityexitenabled | Whether this connection requires a security exit. If unspecified, false is assumed. |
Securityexitlibname | The name of the library for the security exit |
securityexitentrypoint | The entry point of the security exit |
securityexitdata | Data to be passed to the security exit if required |
commandinputqueue | The name of the command input queue. Note, if using the default, this can be left unspecified and generally should be left unspecified |
commandreplyqueue | The name of the queue to use for replies from the command server. Note, if using the default, this can be left unspecified and generally should be left unspecified |
monitoringenabled | If true, this queue manager will be monitored. If left unspecified, false is assumed. |
Indexingenabled | If true, this queue manager will be indexed for searches. If left unspecified, false is assumed. |
Indextype | The type of indexing, 0 means once daily and 1 means periodic |
indexinterval | If indextype is 0 (once daily), then this is the hour of the day to index from 0 to 23. If index type is 1 (periodic), then this is the periodicity (e.g. 2 means index every second hour) |
EMSConnection Operations
Get EMSConnection
REST
GET /ems/connections/[name]
JavaScript
getEMSConnection(name)
Parameters
name – A string representing the name of the connection
Returns
A JavaScript object representing the named connection
Get EMSConnections
REST
GET /ems/connections/
JavaScript
getEMSConnections()
Parameters
None
Returns
A JavaScript array containing connection definitions
Create EMSConnection
REST
POST o to /ems/connections/
JavaScript
createEMSConnection(o)
Parameters
o – A JavaScript object representing the connection
Returns
None
Modify EMSConnection
REST
PUT o to /ems/connections/[name]
JavaScript
modifyEMSConnection(o, name)
Parameters
o – A JavaScript object representing the connection
name – A string representing the name of the connection
Returns
None
Delete EMSConnection
REST
DELETE /ems/connections/[name]
JavaScript
deleteEMSConnection(name)
Parameters
name – A string representing the name of the connection
Returns
None
JSON data format
Field | Description |
---|---|
name | The name of the connection |
url | The url used to connect to the TIBCO EMS server |
username | The administrative username to use when connecting |
password | The administrative password to use when connecting |
indexing_enabled | If true, this TIBCO EMS server will be indexed for searches. If left unspecified, false is assumed. |
Index_type | The type of indexing, 0 means once daily and 1 means periodic |
index_interval | If indextype is 0 (once daily), then this is the hour of the day to index from 0 to 23. If index type is 1 (periodic), then this is the periodicity (e.g. 2 means index every second hour) |
ssl_auth_only |
|
ssl_debug_trace |
|
ssl_enabled |
|
ssl_identity_encoding |
|
ssl_keystore |
|
ssl_keystore_location |
|
ssl_keystore_password |
|
ssl_private_key_encoding |
|
ssl_trace |
|
ssl_truststore |
|
ssl_truststore_location |
|
ssl_truststore_password |
|
ssl_verify_host |
|
ssl_verify_hostname |
|
Event Rule Operations
Get Event Rule
REST
GET /wmq/events/[project]/rules/[name]
JavaScript
getEventRule(project, name)
Parameters
project – A string representing the project name to which the rule belongs
name – A string representing the name of the event rule
Returns
A JavaScript object representing the named event rule
Get Event Rules
REST
GET /wmq/events/[project]/rules/
JavaScript
getEventRules()
Parameters
Project – A string representing the project name to which the event rule belongs
Returns
A JavaScript array containing event rules for the specified project
Create Event Rule
REST
POST o to /wmq/events/[project]/rules/
JavaScript
createEventRule(project, o)
Parameters
project – A string representing the project name to which the rule belongs
o – A JavaScript object representing the event rule
Returns
None
Modify Event Rule
REST
PUT o to /wmq/events/[project]/rules/[name]
JavaScript
modifyEventRule(project, o, name)
Parameters
project – A string representing the project name to which the rule belongs
o – A JavaScript object representing the event rule
name – A string representing the name of the event rule
Returns
None
Delete Event Rule
REST
DELETE /wmq/events/[project]/rules/[name]
JavaScript
deleteEventRule(project, name)
Parameters
project – A string representing the project name to which the rule belongs
name – A string representing the name of the event rule
Returns
None
JSON data format
Event Rule
Field | Description |
---|---|
rulename | The name of the rule. |
level | A number representing the severity of the event. Valid values are: |
trigger | A number representing the trigger type (see triggers below). |
objectname | A string representing the object name to which this rule applies. This value may be a generic name (e.g. QUEUE.AAA*). |
projectname | A string representing the name of the project to which this rule belongs. |
connection | A string representing the name of a connection within the project to which this rule applies. This value may be a generic name (e.g. MYQMCONN*). |
excludename | A string representing an object name to exclude from application of the rule. This value may be a generic name (e.g. QUEUE.AAA*). |
occurrences | A number representing the number of times this condition holds before the event becomes active. |
action | A number representing the action to take when the event becomes active. Valid values are: |
actionrerun | A number representing the number of minutes between re-running the action while the event is active. |
effectivedays | A string containing a comma-separated list of days (by name) for which this event is effective. For instance, specifying "Monday,Tuesday" means the event will only be active on Monday and Tuesday. Valid values for day names are "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", and "Sunday". |
effectivestart | A number representing the beginning time for which this event can be active. The number is specified in minutes since midnight. For example, 360 would indicate that this event would be active beginning at 6:00 AM. |
effectiveend | A number representing the ending time for which this event can be active. The number is specified in minutes since midnight. For example, 1080 would indicate that this event would be active ending at 6:00 AM. |
Trigger Definitions
Trigger ID | Description | Field | Description |
---|---|---|---|
1001 | QueueMoreThanNPercentFull | percentage | A number representing the depth as a percentage vs. max depth |
1002 | QMgrNotAccessible |
|
|
1003 | MessageInDLQ |
|
|
1004 | QueueFull |
|
|
1005 | CommandServerDown |
|
|
1006 | XmitQueueNotServiced |
|
|
1007 | ChannelRetryingXmitQNotEmpty |
|
|
1008 | ChannelRetrying |
|
|
1009 | ChannelInDoubt |
|
|
1010 | ChannelStopped |
|
|
1011 | QueueMoreThanNMessages | messagecount | A number representing the number of messages on a queue |
1012 | QueueMoreThanNMessagesNoReaders | messagecount | A number representing the number of messages on a queue |
1013 | QueueMoreThanNPercentFullNoReaders | percentage | A number representing the depth as a percentage vs. max depth |
1014 | QueueLessThanNReaders | readercount | A number representing the number of readers on a queue |
1015 | QueueLessThanNWriters | writercount | A number representing the number of writers on a queue |
1016 | ServerConnActiveInstancesMoreThanN | channelcount | A number representing the number of channelinstances |
1017 | TotalRunningChannelCountMoreThanN | channelcount | A number representing the number of channelinstances |
1018 | XmitQueueMoreThanNMessages | messagecount | A number representing the number of messages on a queue |
1019 | XmitQueueMoreThanNPercentFull | percentage | A number representing the depth as a percentage vs. max depth |
1020 | FirstMessageOnQueueMoreThanNSeconds | seconds | A number representing the number of seconds that the first message has been on the queue |
1021 | OldestMessageOnQueueMoreThanNSeconds | seconds | A number representing the number of seconds that the oldest message has been on the queue |
1022 | OldestMessageOnXmitQMoreThanNSeconds | seconds | A number representing the number of seconds that the oldest message has been on the queue |
1023 | TriggerMonitorDown | readercount | A number representing the number of readers on the trigger initiation queue |
1024 | ChannelInitiatorDown | readercount | A number representing the number of readers on the channel initiator queue |