Registering with Zowe API Mediation Layer
You can register the RSE API server as a service to Zowe™ API Mediation Layer to route API requests and use the Zowe single sign-on token.
Before registering the RSE API
server with Zowe API Mediation Layer, you must configure the
RSE API server. The RSE API server is an Apache Tomcat server
that has a configuration file called
rseapi.env
. To
allow the RSE API server to make
calls to the Zowe API Gateway for authentication, change the
ZOWE_ML
variable in the rseapi.env
file to the URL of the Zowe API Gateway. For example,
ZOWE_ML=https://example.domain.com:7554/
Zowe instances are configured with a configuration file
called
instance.env
. This file contains a number of customizable key values such as
the port numbers and other runtime data passed to the Zowe
runtime at startup. The RSE API
uses static registration to Zowe API Mediation Layer by
providing a USS file called application.yml
that contains registration details. The
ZWE_STATIC_DEFINITIONS_DIR
variable in instance.env
contains a
list of directories separated by a semicolon, and each directory contains a single
application.yml
static definition file. For example,
ZWE_STATIC_DEFINITIONS_DIR=/var/usr/lpp/zowe/rse
In the directory
/var/usr/lpp/zowe/rse
, create an
application.yml
file. Use the following application.yml
static
definition template, and customize the locations where the RSE API endpoint server is defined:instanceBaseUrls:
documentationUrl:
swaggerUrl:
RSEAPI_HOST
should be replaced with the actual TCP/IP host address, and
RSEAPI_PORT
is the port number (6800 by default).services:
- serviceId: ibmrse # This is the first URL segment to identify RSE
title: Remote System Explorer API
description: Remote System Explorer (RSE) API
catalogUiTileId: ibm-rse-api
instanceBaseUrls:
- https://<RSEAPI_HOST>:<RSEAPI_PORT>/rseapi
homePageRelativeUrl: /
routedServices:
- gatewayUrl: api/v1
serviceRelativeUrl: /api/v1/ # Note the slash at the start
authentication:
scheme: zoweJwt
apiInfo:
- apiId: com.ibm.rse
gatewayUrl: api/v1
version: 1.0.0
documentationUrl: https:<RSEAPI_HOST>:<RSEAPI_PORT>/rseapi
swaggerUrl: https://<RSEAPI_HOST>:<RSEAPI_PORT>/rseapi/api-docs/main-swagger.json
catalogUiTiles:
ibm-rse-api:
title: IBM Remote System Explorer
description: The IBM RSE collection of REST APIs allows working with MVS data sets, z/OS UNIX files and commands, JES jobs, TSO commands, and other z/OS components.
If Zowe API Mediation Layer is running on
example.domain.com:26502
and the RSE API server is running on
example.domain.com:6800
, you should update the ZOWE_ML
variable in
/etc/zexpl/rseapi.env
to
be:ZOWE_ML=https://example.domain.com:26502/
Then, in the directory
/var/usr/lpp/zowe/rse
, create a application.yml
file with the
following code:services:
- serviceId: ibmrse # This is the first URL segment to identify RSE
title: Remote System Explorer API
description: Remote System Explorer (RSE) API
catalogUiTileId: ibm-rse-api
instanceBaseUrls:
- https://example.domain.com:6800/rseapi
homePageRelativeUrl: /
routedServices:
- gatewayUrl: api/v1
serviceRelativeUrl: /api/v1/ # Note the slash at the start
authentication:
scheme: zoweJwt
apiInfo:
- apiId: com.ibm.rse
gatewayUrl: api/v1
version: 1.0.0
documentationUrl: https://example.domain.com:6800/rseapi
swaggerUrl: https://example.domain.com:6800/rseapi/api-docs/main-swagger.json
catalogUiTiles:
ibm-rse-api:
title: IBM Remote System Explorer
description: The IBM RSE collection of REST APIs allows working with MVS data sets, z/OS UNIX files and commands, JES jobs, TSO commands, and other z/OS components.
Note: The
application.yml
file must be encoded in UTF-8. If when you look at the
file using cat
from ssh
and you can see the file rendered, then it
is likely encoded in EBCDIC. You can convert it with the iconv
command. For
example, by running the following sample command, you can convert the input file
application.ebcdic
to UTF-8 characters in the output file
application.yml
.iconv -f IBM-1047 -t ISO8859-1 application.ebcdic > application.yml