Skip to content

ancalabrese/ws1cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ws1cli

A command-line interface for Workspace ONE UEM (Omnissa).

Commands are generated directly from the official WS1 UEM OpenAPI spec, so the CLI stays in sync with the API surface.

Installation

go install github.com/ancalabrese/ws1cli/cmd/ws1@latest

Or build from source:

make build        # outputs bin/ws1
make install      # installs to $GOPATH/bin

Setup

1. Set your server:

ws1 config --server as1831.awmdm.com --version 2506

2. Authenticate with OAuth2 client credentials:

ws1 login --client-id <client-id> --secret <client-secret>

By default the auth region is na. Use --region to pick another (na, emea, apac, uat).

Tokens are refreshed automatically before expiry.

3. Verify config:

ws1 config

Configuration is stored at ~/.config/ws1/config.json.

Usage

ws1 <group> <subgroup> <operation> [flags]

Commands are organised by API group:

Group Description
mam Mobile Application Management
mcm Mobile Content Management
mdm Mobile Device Management

All commands output pretty-printed JSON.

Example

ws1 mam apps list
ws1 mdm get-devices-search --platform Android

Global flags

Flag Env var Description
--server WS1_SERVER Server hostname override
--token WS1_TOKEN Bearer token override (disables auto-refresh)
--tenant WS1_TENANT aw-tenant-code header override

Development

Regenerate everything from spec:

make gen          # gen-client + gen-cli
make gen-client   # API client (ws1/client.gen.go) via oapi-codegen
make gen-cli      # Cobra commands (internal/cli/gen/) via cmd/gen_cli

Validate the spec:

make validate

About

A CLI tool for Omnissa Workspace One - Device Management without clicks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors