Skip to content

zowe/zowe-client-swift-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zowe Swift Client SDK

A macOS/iOS/iPadOS/tvOS/watchOS Swift-written library for z/OSMF REST API

The Zowe Swift Client SDK is an open-source Swift package for z/OSMF REST API. It allows you to leverage mainframe capabilities from your Swift applications with minimum effort.

ZoweClientSwiftSDK

Installation

Fore more details on Zowe Swift Client SDK debug version installation, follow this INSTALL.md

Quickstart

Start by importing the ZoweSDK class.

import ZoweSDK

Then create an object that will be the handler for all z/OSMF requests.

let z = ZoweSDK(
    host: "<zosmf host>",
    port: "<zosmf port>",
    user: "<zosmf user>", 
    password: "<zosmf password>")

The SDK supports both manual authentication and Zowe z/OSMF mobile profiles. To create a Zowe z/OSMF mobile profile, use a regular Dictionary and store it in UserDefaults under the key with your chosen profile name.

let zoweProfile = [
    "host": "<zosmf host>", 
    "port": "<zosmf port>", 
    "user": "<zosmf user>", 
    "password": "<zosmf password>"]
UserDefaults.standard.set(zoweProfile, forKey: "<profile name>")

Then to use a Zowe z/OSMF profile, simply inform the profile name while creating the object.

let z = ZoweSDK(profileName: "<profile name>")

Available options

Currently, the Zowe Swift Client SDK supports the following interfaces:

z/OSMF

To retrieve information about z/OSMF on a particular z/OS system:

z.zosmf.getInfo() { response in 
    print(response) 
}

Fore more details on z/OSMF for Zowe SDK package usage, follow this README.md

Data sets

To create a data set (binary, C, classic, partitioned and sequential data set creation is currently supported):

z.files.createDsn(
    datasetName: "<data set name>", 
    datasetType: .<binary|c|classic|partitioned|sequential>, 
    datasetAttributes: [<attributes dictionary>]
) { response in
    print(response)
}

Fore more details on z/OS Files for Zowe SDK package usage, follow this README.md

Jobs

To list the jobs for an owner, prefix, max-jobs and/or user-correlator:

z.jobs.listJobs(
    owner: [<owner>],
    prefix: [<prefix>],
    maxJobs: [<max-jobs>],
    userCorrelator: [<user-correlator>]
) { response in
    print(response)
}

Fore more details on z/OS Jobs for Zowe SDK package usage, follow this README.md

Acknowledgments

  • Make sure to check out the Zowe project!
  • For further information on z/OSMF REST API, click HERE

About

Zowe Client Swift SDK

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages