# z/OS Management Facility Package

Contains APIs to interact with the z/OS Management Facility (using z/OSMF REST endpoints).

## API Examples

Check z/OSMF status

    import { ProfileInfo } from "@zowe/imperative";
    import { CheckStatus } from "@zowe/zosmf-for-zowe-sdk";

    (async () => {
        // Load connection info from default z/OSMF profile
        const profInfo = new ProfileInfo("zowe");
        await profInfo.readProfilesFromDisk();
        const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf");
        const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true });
        const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs);

        const response = await CheckStatus.getZosmfInfo(session);
        console.log(response);
    })().catch((err) => {
        console.error(err);
        process.exit(1);
    });

#

List systems defined to z/OSMF

    import { ProfileInfo } from "@zowe/imperative";
    import { ListDefinedSystems } from "@zowe/zosmf-for-zowe-sdk";

    (async () => {
        // Load connection info from default z/OSMF profile
        const profInfo = new ProfileInfo("zowe");
        await profInfo.readProfilesFromDisk();
        const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf");
        const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true });
        const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs);

        const response = await ListDefinedSystems.listDefinedSystems(session);
        console.log(response);
    })().catch((err) => {
        console.error(err);
        process.exit(1);
    });

## Index

### Classes

- CheckStatus
- ListDefinedSystems
- ZosmfBaseHandler
- ZosmfSession

### Interfaces

- IDefinedSystem
- IZosmfInfoResponse
- IZosmfListDefinedSystemsResponse
- IZosmfPluginInfo

### Object literals

- ZosFilesOptions
- ZosmfConstants
- ZosmfMessages
- ZosmfProfile

## Object literals

### Const ZosFilesOptions

ZosFilesOptions: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:86

Object containing all options to be used by the Download data set API

### responseTimeout

responseTimeout: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:91

The files timeout header value

### aliases

aliases: string[] = ["rto"]

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:93

### defaultValue

defaultValue: undefined = undefined

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:97

### description

description: string = "The maximum amount of time in seconds the z/OSMF Files TSO servlet should run before returning a response." +" Any request exceeding this amount of time will be terminated and return an error. Allowed values: 5 - 600"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:94

### name

name: string = "response-timeout"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:92

### numericValueRange

numericValueRange: number[] = [5, 600]

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:99

### type

type: string = "number"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:96

### Const ZosmfConstants

ZosmfConstants: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:17

Constants to be used by the z/OSMF API

### INFO

INFO: string = "/info"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:28

indicator for get info request

### RESOURCE

RESOURCE: string = "/zosmf"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:22

Specifies the z/OS data set and file REST interface

### SYSTEMS

SYSTEMS: string = "/systems"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:40

indicator for get defined systems in zosmf

### TOPOLOGY

TOPOLOGY: string = "/resttopology"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:34

indicator for get topology services

### ERROR_CODES

ERROR_CODES: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:46

Known error codes return by the API

### BAD_HOST_NAME

BAD_HOST_NAME: string = "ENOTFOUND"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:51

Error code when unable to connect to host

### BAD_PORT

BAD_PORT: string = "ECONNREFUSED"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:57

Error code when unable to connect to port

### SELF_SIGNED_CERT_IN_CHAIN

SELF_SIGNED_CERT_IN_CHAIN: string = "SELF_SIGNED_CERT_IN_CHAIN"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:63

Error code when self signed certificate in chain

### UNABLE_TO_VERIFY_LEAF_SIGNATURE

UNABLE_TO_VERIFY_LEAF_SIGNATURE: string = "UNABLE_TO_VERIFY_LEAF_SIGNATURE"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:69

Error code when unable to verify the first certificate

### VERSIONS

VERSIONS: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:72

### V2R1

V2R1: string = "24"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:73

### V2R2

V2R2: string = "25"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:74

### V2R3

V2R3: string = "26"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:75

### V2R4

V2R4: string = "27"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:76

### V2R5

V2R5: string = "28"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:77

### V3R1

V3R1: string = "29"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.constants.ts:78

### Const ZosmfMessages

ZosmfMessages: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.messages.ts:18

Messages to be used as detail display error message when gathering z/OSMF information

### improperRejectUnauthorized

improperRejectUnauthorized: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.messages.ts:44

Message indicate that the rejectUnauthorized flag was not set properly

### message

message: string = "A self-signed certificate was used ({{causeMsg}}),and your reject-unauthorized option is '{{rejectUnauthorized}}'."

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.messages.ts:45

### invalidHostName

invalidHostName: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.messages.ts:30

Message indicate that unable to connect to specified host name

### message

message: string = "Unable to establish connection to host "

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.messages.ts:31

### invalidPort

invalidPort: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.messages.ts:37

Message indicate that unable to establish connection with specified port number

### message

message: string = "Unable to establish connection at port "

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.messages.ts:38

### missingSession

missingSession: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.messages.ts:23

Message indicate that input session object is invalid

### message

message: string = "Missing profile session information."

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.messages.ts:24

### Const ZosmfProfile

ZosmfProfile: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:21

Profile configuration for ZOSMF profiles

memberof

  ZosmfProfile

### type

type: string = "zosmf"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:23

### schema

schema: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:24

### description

description: string = "z/OSMF Profile"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:27

### required

required: undefined[] = []

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:88

### title

title: string = "z/OSMF Profile"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:26

### type

type: string = "object"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:25

### properties

properties: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:28

### basePath

basePath: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:65

### optionDefinition

optionDefinition: any = ZosmfSession.ZOSMF_OPTION_BASE_PATH

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:67

### type

type: string = "string"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:66

### certFile

certFile: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:52

### optionDefinition

optionDefinition: any = ZosmfSession.ZOSMF_OPTION_CERT_FILE

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:54

### type

type: string = "string"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:53

### certKeyFile

certKeyFile: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:56

### optionDefinition

optionDefinition: any = ZosmfSession.ZOSMF_OPTION_CERT_KEY_FILE

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:58

### type

type: string = "string"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:57

### encoding

encoding: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:73

### type

type: string = "string"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:74

### optionDefinition

optionDefinition: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:75

### aliases

aliases: string[] = ["ec"]

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:77

### description

description: string = "The encoding for download and upload of z/OS data set and USS files." +" The default encoding if not specified is IBM-1047."

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:78

### name

name: string = "encoding"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:76

### type

type: string = "string"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:80

### host

host: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:29

### optionDefinition

optionDefinition: any = ZosmfSession.ZOSMF_OPTION_HOST

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:31

### type

type: string = "string"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:30

### password

password: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:43

### optionDefinition

optionDefinition: any = ZosmfSession.ZOSMF_OPTION_PASSWORD

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:46

### secure

secure: boolean = true

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:45

### type

type: string = "string"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:44

### port

port: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:33

### includeInTemplate

includeInTemplate: boolean = true

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:36

### optionDefinition

optionDefinition: any = ZosmfSession.ZOSMF_OPTION_PORT

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:35

### type

type: string = "number"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:34

### protocol

protocol: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:69

### optionDefinition

optionDefinition: any = ZosmfSession.ZOSMF_OPTION_PROTOCOL

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:71

### type

type: string = "string"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:70

### rejectUnauthorized

rejectUnauthorized: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:48

### optionDefinition

optionDefinition: any = ZosmfSession.ZOSMF_OPTION_REJECT_UNAUTHORIZED

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:50

### type

type: string = "boolean"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:49

### responseTimeout

responseTimeout: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:83

### optionDefinition

optionDefinition: any = ZosFilesOptions.responseTimeout

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:85

### type

type: string = "number"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:84

### user

user: object

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:38

### optionDefinition

optionDefinition: any = ZosmfSession.ZOSMF_OPTION_USER

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:41

### secure

secure: boolean = true

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:40

### type

type: string = "string"

- Defined in @zowe/zosmf-for-zowe-sdk/src/constants/Zosmf.profile.ts:39

Generated using TypeDoc