Register an event handler
You can use this operation to define a new event handler to z/OSMF.
HTTP method and URI path
POST /zosmf/izual/rest/handler?eventTypeId=<eventTypeId>
- /zosmf/izual/rest identifies the Application Linking Manager interface.
- handler identifies the event handler component of the application linking process.
- eventTypeId=<eventTypeId> is the event type to be associated with the new handler.
Standard headers
Content-Type: application/json
Custom headers
None.
Request content
Your request must include a JSON object that describes the event handler to be registered.
- type
- Handler type. For a z/OSMF plug-in, specify INTERNAL. For an external application, specify EXTERNAL.
- id
- Unique identifier for a launch point within the handler task or
application. It can contain up to 50 characters, including alphanumeric
characters (A-Z, a-z, and 0-9), periods (.), and underscores (_).
The handler ID is required and must be unique.
For external applications, you can specify any value. To ensure uniqueness, it is recommended that you make the company name and the application name part of the handler ID. For example, IBM.TIVOLI.OMEGAMON.
For applications within the ISPF task, it is recommended that you prefix the handler ID with IBM.ISPF. Then, specify an ID for the application that will handle the events. For example, IBM.ISPF.SDSF.ST.
- applId
- Identifier assigned to the z/OSMF plug-in that contains the task. It is required for a z/OSMF task (type is set to INTERNAL).
Omit this value if the handler is an external application. Table 1 lists the valid applId values for the z/OSMF tasks.
Table 1. Valid applId values for the z/OSMF plug-ins z/OSMF Task applId Value Configuration Assistant task CAV1R11 Import Manager task IzuImportManager ISPF task com.ibm.zoszmf.ispf Resource Monitoring task IZUR System Status task IZUR Workflows task workflow Workload Management task IZUW - taskId
- Identifier assigned to the z/OSMF task. It can contain up to 50 characters, including alphanumeric characters (A-Z, a-z, and 0-9),
periods (.), and underscores (_). The task ID is required when type is set to
INTERNAL. Omit this value if the handler is an external application. Table 2 lists the valid task ID values for the z/OSMF tasks.
Table 2. Valid taskId values for the z/OSMF tasks z/OSMF Task taskId Value Configuration Assistant task Configuration Assistant Import Manager task IZUG_TASK_zOSMFImportManager ISPF task ISPF Resource Monitoring task IZUR_PERFDESKS_TASK_ID System Status task IZUR_OVERVIEW_TASK_ID Workflows task Workflows Workload Management task Workload Management - displayName
- For the handler name, specify the name of the handler task or
application. The name is required and can contain up to 50 characters.
For z/OSMF tasks,
it is recommended that you use the same name displayed in thez/OSMF navigation area.
For example, Workload Management.
For external applications, it is recommended that you use the name of the product or application. For example, Omegamon.
- url
- URL to be used for accessing the handler. The URL can contain
up to 4,000 characters, including alphanumeric characters (A-Z, a-z,
0-9), blanks, mathematical symbols (+ - = | ~ ( ) { } \), punctuation
marks (? , . ! ; : ' " / [ ]), and the following special characters:
%, $, #, @, ^, *, and _. The URL is required and must be URI-encoded
as specified in RFC 2396. For more information about RFC 2396, see
the Uniform
Resource Identifiers (URI): Generic Syntax web page.
For a z/OSMF task, specify a URL that is relative to the z/OSMF instance. That is, the URL must begin with /zosmf/. For an external application, specify the full URL, including the protocol.
- options
- The CONTEXT_SUPPORT option indicates what the handler will display
when it processes events of this type. Specify one of the following
values for CONTEXT_SUPPORT:
- OPT_CONTEXT_SUPPORT_NONE
- Handler is launched without context. That is, its
homepage is displayed. If the handler is already open, it receives
focus, but the context is not updated.
If the handler is an external application, it opens in a separate window. Otherwise, the handler opens in a new z/OSMF task tab.
This option is selected by default.
- OPT_CONTEXT_SUPPORT_LAUNCH
- Handler is launched with context. If the handler
is already open, it receives focus, but the context is not updated.
If the handler is an external application, it opens in a separate window. Otherwise, the handler opens in a new z/OSMF task tab.
- OPT_CONTEXT_SUPPORT_LAUNCH_AND_RELOAD
- Handler is launched with context. If the handler is already open, a message is displayed warning the user that the current context will be overwritten. This option is supported only when the event requestor and handler are z/OSMF tasks.
- OPT_CONTEXT_SUPPORT_LAUNCH_AND_SWITCH
- Handler is launched with the context it specified when subscribing to the event type. This option is supported only when the event requestor and handler are z/OSMF tasks.
Usage considerations
Required authorizations
Expected response
On completion, the Application Linking Manager interface returns an HTTP response, which includes a status code indicating whether your request completed. Status code 200 indicates success. A status code of 4nn or 5nn indicates that an error has occurred. See Error handling.
IBM-supplied event handler registrations
z/OSMF includes a number of predefined event types, requestors, and handlers. For a list, see Event types, requestors, and handlers shipped with z/OSMF.