National Pizza Magistrate


    2.0.0 • Public • Published

    Build status Dependencies Module LTS Adopted'

    Table of Contents

    Node zosconnect

    A wrapper service for z/OS® Connect EE, enabling node applications to discover and access zSystems resources that are service enabled by z/OS® Connect. Version 2 of this module pre-reqs z/OS Connect EE V3.0.8 or later.

    Services and APIs are identified by name that is unique within the scope of the target z/OS® Connect instance (or cluster). The node application uses pre-existing knowledge of the service or API name, or discovers it dynamically by retrieving a list of available services or APIs. The z/OS® Connect node wrapper provides access to JSON request and response schemas for the specific z/OS® Connect service and the Swagger document for APIs, enabling the node application to invoke that service and process the response.


    npm install zosconnect-node


    Connecting to z/OS Connect

    var ZosConnect = require('zosconnect-node');
    var options = {
    var zosconnect = new ZosConnect(options);

    The options object matches exactly the options described by the request/request module. The uri or url parameter must be specified.

    HTTPs Support

    Create the options object with locations for the CA certificate file and optionally the client certificate and client private key (if using client authentication). If the strictSSL option is set to false then invalid SSL certificates can be used which may be of use in development environments.

    var fs = require('fs');
    var path = require('path');
    var caFile = path.resolve(__dirname, 'ca.pem');
    var certFile = path.resolve(__dirname, 'cert.pem');
    var keyFile = path.resolve(__dirname, 'key.pem');
    var options = {
      ca: fs.readFileSync(caFile),
      cert: fs.readFileSync(certFile),
      key: fs.readFileSync(keyFile),
      passphrase: 'passw0rd',
      strictSSL: true
    Basic Authentication

    Add the authentication credentials to the options object.

    var options = {
      uri: 'http://mainframe:9080',
      auth: {
        user: 'userId',
        pass: 'password'


    Retrieve a list of APIs
    Get an API
    Create an API
    Call an API
    zosconnect.getApi('healthApi').then((api) => {
      api.invoke('patient/12345', 'GET', null).then((response) => {
        if(response.statusCode != 200) {
          console.log('Invoke failed with respCode = ' + response.statusCode);
        } else {
    Get the Swagger document for an API
    zosconnect.getApi('healthApi').then((api) => {
    Start or Stop an API
    zosconnect.getApi('healthApi', function(error, api){
    Update an API
    zosconnect.getApi('healthApi').then((api) => {
    Delete an API
    zosconnect.getApi('healthApi').then((api) => {


    Retrieve a list of services
    Create a Service
    Get a service
    //normally this would then go on and work with the service
    Invoke a service
    zosconnect.getService('dateTimeService').then((service) => {
      service.invoke({input:'data'}).then((response) => {
        if(response.statusCode != 200) {
          console.log('Invoke failed with respCode = ' + response.statusCode);
        } else {
    Get the request schema
    zosconnect.getService('dateTimeService').then((service) => {
    Get the response schema
    zosconnect.getService('dateTimeService').then((service) => {
    Update a Service
    zosconnect.getService('dateTimeService').then((service) => {
    Delete a Service
    zosconnect.getService('dateTimeService').then((service) => {

    Module Long Term Support Policy

    This module adopts the Module Long Term Support (LTS) policy, with the following End Of Life (EOL) dates:

    Module Version Release Date Minimum EOL EOL With Status
    2.x.x Jul 2018 Dec 2019 Current
    1.x.x Jul 2017 Dec 2019 Node 8 LTS


    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.


    npm i zosconnect-node

    DownloadsWeekly Downloads






    Unpacked Size

    72.4 kB

    Total Files


    Last publish


    • crshnburn